### Start Eclipse Wakaama Client (C) Source: https://help.1nce.com/dev-hub/docs/lwm2m-client-examples This command starts the Wakaama LwM2M client example. It requires the pre-built Wakaama client executable and connects to the 1NCE LwM2M service endpoint using UDP (option -4). ```shell ./lwm2mclient -b -h lwm2m.os.1nce.com -p 5683 -4 ``` -------------------------------- ### GET /plugins Source: https://help.1nce.com/dev-hub/openapi/1nce-os Retrieves a list of installed plugins. This endpoint returns information about all plugins currently installed in your account. ```APIDOC ## GET /plugins ### Description Retrieves a list of installed plugins. This endpoint returns information about all plugins currently installed in your account. ### Method GET ### Endpoint /plugins ### Parameters (No parameters for this request) ### Response #### Success Response (200 OK) - **id** (string) - The unique identifier for the plugin installation. - **partner** (string) - The name of the partner providing the plugin. - **created** (string) - The timestamp when the plugin installation was created. - **updated** (string) - The timestamp when the plugin installation was last updated. - **status** (string) - The current status of the plugin installation (e.g., INSTALLED). #### Response Example ```json [ { "id": "mo3--1DzmAgO-X777AY9h", "partner": "PLUGIN-PARTNER", "created": "2022-03-07T08:51:29.015Z", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED" } ] ``` ``` -------------------------------- ### Example API Endpoint Source: https://help.1nce.com/dev-hub/docs/vpn-service-features-limitations This is an example of a typical API endpoint within the Help Center API. It demonstrates a GET request to retrieve a list of articles. ```APIDOC ## GET /api/help/articles ### Description Retrieves a list of all available articles in the help center. ### Method GET ### Endpoint /api/help/articles #### Query Parameters - **category** (string) - Optional - Filters articles by a specific category. - **search** (string) - Optional - Performs a keyword search across article titles and content. ### Request Example ```bash GET /api/help/articles?category=troubleshooting&search=login ``` ### Response #### Success Response (200) - **articles** (array) - A list of article objects. - **id** (string) - The unique identifier for the article. - **title** (string) - The title of the article. - **summary** (string) - A brief summary of the article's content. - **url** (string) - The URL to access the full article. #### Response Example ```json { "articles": [ { "id": "article-123", "title": "How to Reset Your Password", "summary": "Step-by-step guide to resetting your account password.", "url": "/help/articles/how-to-reset-password" }, { "id": "article-456", "title": "Troubleshooting Login Issues", "summary": "Common issues and solutions for login problems.", "url": "/help/articles/troubleshooting-login-issues" } ] } ``` #### Error Response (404) - **error** (string) - Description of the error, e.g., "No articles found." ``` -------------------------------- ### GET /v1/partners/plugins Source: https://help.1nce.com/dev-hub/openapi/1nce-os Retrieves a list of all currently installed plugins. ```APIDOC ## GET /v1/partners/plugins ### Description Fetches a list of all installed plugins on the system. ### Method GET ### Endpoint /v1/partners/plugins ### Parameters #### Query Parameters - **page** (integer) - Optional - Number of the requested page. Use this parameter to iterate through all items on the different pages. The total amount of pages is listed in the response body (pageAmount). (default: 1, minimum: 1, maximum: 50) - **pageSize** (integer) - Optional - Parameter for specifying the queried items per page. (default: 10, minimum: 1) - **sort** (string) - Optional - Sort values based on keys that are listed as a comma separated list, prepend with "-" for descending order. ### Response #### Success Response (200) - **(object)** - OK #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Node.js API Request Example Source: https://help.1nce.com/dev-hub/v200/docs/vpn-service-features-limitations Demonstrates how to make an API request using Node.js. This example likely involves setting up authentication headers and constructing a valid request body. ```javascript const fetch = require('node-fetch'); async function callApi() { const url = 'https://api.1nce.com/v1/devices'; const options = { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Content-Type': 'application/json' } }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error('Error calling API:', error); } } callApi(); ``` -------------------------------- ### Python API Request Example Source: https://help.1nce.com/dev-hub/v200/docs/vpn-service-features-limitations Illustrates how to interact with the 1NCE API using Python. This snippet shows how to send a GET request with necessary headers for authentication. ```python import requests url = "https://api.1nce.com/v1/devices" headers = { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### Java API Request Example Source: https://help.1nce.com/dev-hub/v200/docs/vpn-service-features-limitations Provides an example of making an API call in Java. This code snippet likely uses a library like Apache HttpClient or OkHttp to handle the HTTP request. ```java import okhttp3.*; import java.io.IOException; public class ApiRequest { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); String url = "https://api.1nce.com/v1/devices"; Request request = new Request.Builder() .url(url) .addHeader("Authorization", "Bearer YOUR_API_TOKEN") .addHeader("Content-Type", "application/json") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } } ``` -------------------------------- ### Update SIM Card Status Source: https://help.1nce.com/dev-hub/v200/docs/vpn-service-features-limitations This example shows how to update the status of a SIM card, for example, to suspend or activate it. It requires the SIM card's ICCID, the new status, and an API key. The API returns the updated SIM object upon success. ```javascript async function updateSimStatus(iccid, newStatus, apiKey) { const url = `https://api.1nce.com/management/v1/sims/${iccid}`; const headers = { "Authorization": `Token ${apiKey}`, "Content-Type": "application/json" }; const body = JSON.stringify({ "status": newStatus }); try { const response = await fetch(url, { method: 'PATCH', headers: headers, body: body }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); return data; } catch (error) { console.error("Error updating SIM status:", error); return null; } } // Example usage: // const iccid = "YOUR_ICCID"; // const newStatus = "suspended"; // or "active" // const apiKey = "YOUR_API_KEY"; // updateSimStatus(iccid, newStatus, apiKey).then(updatedSimData => { // if (updatedSimData) { // console.log("SIM status updated successfully:", updatedSimData.status); // } // }); ``` -------------------------------- ### Get SIM Card Details Source: https://help.1nce.com/dev-hub/v200/docs/vpn-service-features-limitations This function retrieves detailed information about a specific SIM card using its ICCID. It requires an API key for authentication. The response includes details such as IMSI, status, and associated device information. ```python import requests def get_sim_details(iccid, api_key): url = f"https://api.1nce.com/management/v1/sims/{iccid}" headers = { "Authorization": f"Token {api_key}" } try: response = requests.get(url, headers=headers) response.raise_for_status() # Raise an exception for bad status codes return response.json() except requests.exceptions.RequestException as e: print(f"Error fetching SIM details: {e}") return None # Example usage: # iccid = "YOUR_ICCID" # api_key = "YOUR_API_KEY" # sim_data = get_sim_details(iccid, api_key) # if sim_data: # print(f"SIM IMSI: {sim_data['imsi']}") # print(f"SIM Status: {sim_data['status']}") ``` -------------------------------- ### Get Administration Logs - PHP Example Source: https://help.1nce.com/dev-hub/reference/administration-logs Illustrates how to make a GET request to the administration logs endpoint using PHP. This example utilizes cURL functions to send the request and retrieve the JSON response. ```php ``` -------------------------------- ### Start Eclipse Leshan Client (Java) Source: https://help.1nce.com/dev-hub/docs/lwm2m-client-examples This command starts the Leshan LwM2M client demo. It requires a Java Runtime Environment and the built Leshan client JAR file. The client connects to the 1NCE LwM2M service endpoint. ```shell java -jar ./target/leshan-client-demo-2.0.0-SNAPSHOT-jar-with-dependencies.jar -b -u lwm2m.os.1nce.com:5683 ``` -------------------------------- ### Get SIM Usage - PHP Example Source: https://help.1nce.com/dev-hub/reference/sim-usage A PHP code example for fetching SIM usage data from the 1NCE API. This snippet shows how to use cURL in PHP to make the HTTP GET request and parse the JSON response. ```php ``` -------------------------------- ### Get SIM Usage - Node.js Example Source: https://help.1nce.com/dev-hub/reference/sim-usage Example of how to fetch SIM usage data using Node.js. This code snippet demonstrates making an HTTP GET request to the specified API endpoint, handling the response, and logging the usage statistics. ```javascript // Placeholder for Node.js code example - actual implementation would involve an HTTP client library like 'axios' or 'node-fetch' // Example structure: // const axios = require('axios'); // // async function getSimUsage(iccid, startDt, endDt) { // const url = `https://api.1nce.com/management-api/v1/sims/${iccid}/usage?start_dt=${startDt}&end_dt=${endDt}`; // try { // const response = await axios.get(url, { // headers: { // 'accept': 'application/json', // 'authorization': 'Bearer YOUR_API_KEY' // Replace with actual auth mechanism // } // }); // console.log(response.data); // return response.data; // } catch (error) { // console.error('Error fetching SIM usage:', error); // throw error; // } // } // // // Usage example: // // getSimUsage('YOUR_ICCID', '2023-01-01', '2023-01-31'); ``` -------------------------------- ### Start OpenVPN Client Source: https://help.1nce.com/dev-hub/docs/examples-vpn-linux Initiates the OpenVPN client connection using a specified configuration file. This command is typically run directly in the terminal for debugging purposes, providing immediate log output. Ensure the path to the configuration file is correct. ```bash sudo openvpn --config /etc/openvpn/1nce-conf.conf ``` -------------------------------- ### Get All SIMs - Python Request Source: https://help.1nce.com/dev-hub/v200/reference/general-sims-1 Example Python code using the 'requests' library to get SIM data. Shows a simple GET request with headers. ```python import requests url = "http://api.1nce.com/management-api/v2/sims?page=1&pageSize=10" headers = { "accept": "application/json" } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Install OpenVPN on Ubuntu Source: https://help.1nce.com/dev-hub/docs/examples-vpn-linux Installs the OpenVPN client package on your Ubuntu system using the apt package manager. This command fetches and installs the necessary binaries and dependencies for OpenVPN functionality. An alternative is to build from source for custom versions. ```bash sudo apt install openvpn ``` -------------------------------- ### Get All SIMs - Node.js Request Source: https://help.1nce.com/dev-hub/v200/reference/general-sims-1 Example Node.js code using 'node-fetch' to get a list of SIM cards. Demonstrates making a GET request with headers. ```javascript import fetch from 'node-fetch'; const url = "http://api.1nce.com/management-api/v2/sims?page=1&pageSize=10"; const headers = { "accept": "application/json" }; fetch(url, { method: 'GET', headers: headers }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error(error)); ``` -------------------------------- ### Thingy:91 Prebuilt Firmware Source: https://help.1nce.com/dev-hub/docs/sdk-blueprints-zephyr Information about the ready-to-flash firmware for Thingy:91, including download link and a note on initial network connection. ```APIDOC ## Ready-to-Flash Firmware for Thingy:91 ### Description A prebuilt HEX file for Thingy:91 is provided for quick testing, requiring no build setup. ### Download [Thingy:91 Prebuilt HEX](https://github.com/1NCE-GmbH/blueprint-zephyr/blob/main/nce_udp_demo/thingy_binaries/zephyr.signed.hex) ### Note The firmware is configured with all LTE bands enabled, which may cause a delay of several minutes during the initial network connection while scanning for available bands. This is normal. ``` -------------------------------- ### Memfault Plugin Installation via API Source: https://help.1nce.com/dev-hub/docs/1nce-os-plugins-device-observability-memfault This endpoint allows for the creation of the Memfault plugin using the 'MEMFAULT' partner. No request body is required. ```APIDOC ## POST /partners/MEMFAULT/plugins ### Description Installs the Memfault plugin for your 1NCE organization. ### Method POST ### Endpoint /partners/MEMFAULT/plugins ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```curl curl --location --request POST 'https://api.1nce.com/management-api/v1/partners/MEMFAULT/plugins' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' ``` ### Response #### Success Response (200) Details about the installed plugin, including a link to finalize registration in the Memfault portal. #### Response Example (Response structure not provided in source text) ``` -------------------------------- ### POST /plugins/memfault Source: https://help.1nce.com/dev-hub/openapi/1nce-os Installs the Memfault plugin for 1NCE OS. This endpoint configures the integration with Memfault. ```APIDOC ## POST /plugins/memfault ### Description Installs the Memfault plugin for 1NCE OS, enabling integration with Memfault. ### Method POST ### Endpoint /plugins/memfault ### Parameters *No specific request body parameters are defined in the provided schema.* ### Request Example ```json {} ``` ### Response #### Success Response (200) - **id** (string) - Plugin installation identifier - **partner** (string) - Partner name - **created** (string) - Plugin installation timestamp (date-time) - **updated** (string) - Plugin installation update timestamp (date-time) - **status** (string) - Status of the plugin installation #### Response Example ```json { "partner": "MEMFAULT", "created": "2022-03-07T08:51:29.015Z", "id": "mo3--1DzmAgO-X777AY9h", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED" } ``` ``` -------------------------------- ### API Integration Example - Curl Source: https://help.1nce.com/dev-hub/v200/docs/examples-vpn-macos This Curl command demonstrates a basic API integration with the 1NCE platform, likely for authenticating or retrieving initial information. It specifies the HTTP method, URL, and necessary headers. The output is the raw HTTP response from the server. ```shell curl -X GET \ 'https://api.1nce.com/v1/helloworld' \ -H 'Authorization: ApiKey YOUR_API_KEY' ``` -------------------------------- ### Get SIM Connectivity Information (Node.js) Source: https://help.1nce.com/dev-hub/reference/connectivity This Node.js example shows how to fetch SIM connectivity details using the 1NCE Management API. It utilizes standard HTTP request methods and includes placeholders for necessary headers and parameters. Ensure you have an appropriate HTTP client library installed. ```Node.js const fetch = require('node-fetch'); const options = { method: 'GET', headers: { 'accept': 'application/json' } }; fetch('https://api.1nce.com/management-api/v1/sims/iccid/connectivity_info?subscriber=true&ussd=false', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` -------------------------------- ### Get All Orders API Request (cURL) Source: https://help.1nce.com/dev-hub/reference/orders This snippet demonstrates how to make a GET request to the 'Get All Orders' endpoint using cURL. It includes example query parameters for pagination (page, pageSize) and sorting (sort). ```Shell curl --request GET \ --url 'https://api.1nce.com/management-api/v1/orders?page=1&pageSize=10&sort=order_number' \ --header 'accept: application/json' ``` -------------------------------- ### List All Plugins Source: https://help.1nce.com/dev-hub/openapi/1nce-os Retrieves a paginated list of all installed plugins. Includes information such as partner, creation date, ID, update date, and status. ```APIDOC ## GET /plugins ### Description Retrieves a paginated list of all installed plugins. Includes information such as partner, creation date, ID, update date, and status. ### Method GET ### Endpoint /plugins ### Query Parameters - **page** (number) - Optional - The current page number for pagination. - **limit** (number) - Optional - The number of items to return per page. ### Response #### Success Response (200) - **items** (array) - List of Plugin objects. - **id** (string) - Plugin installation identifier. - **partner** (string) - Partner name. - **created** (string) - Plugin installation timestamp (date-time). - **updated** (string) - Plugin installation update timestamp (date-time). - **status** (string) - Status of the plugin installation (e.g., "INSTALLED"). - **serverDomain** (string) - Tartabit IoT Bridge host domain. - **webhookKey** (string) - Webhook Secret from service specification in Tartabit IoT Bridge. - **page** (number) - Current page number. - **pageAmount** (number) - Total number of pages. #### Response Example ```json { "items": [ { "partner": "PLUGIN-PARTNER", "created": "2022-03-07T08:51:29.015Z", "id": "mo3--1DzmAgO-X777AY9h", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED" }, { "partner": "PLUGIN-PARTNER", "created": "2022-03-07T08:51:29.015Z", "id": "mo3--1DzmAgO-X777AY9h", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED" } ], "page": 1, "pageAmount": 2 } ``` #### Error Response (400) - **statusCode** (integer) - HTTP Response Code (400). - **statusText** (string) - HTTP Status Text ("Bad Request"). - **errors** (array) - Detailed error information. #### Error Response (404) - **statusCode** (integer) - HTTP Response Code (404). - **statusText** (string) - HTTP Status Text ("Not Found"). - **errors** (array) - Detailed error information. #### Error Response (500) - **statusCode** (integer) - HTTP Response Code (500). - **statusText** (string) - HTTP Status Text ("Server Error"). - **errors** (array) - Detailed error information. ``` -------------------------------- ### Get All Devices API Request (Node.js) Source: https://help.1nce.com/dev-hub/reference/device-inspector Example Node.js code using the 'axios' library to make a GET request to the 'Get All Devices' endpoint of the 1NCE Management API. It demonstrates setting request headers and handling responses. ```javascript const axios = require('axios'); const options = { method: 'GET', url: 'https://api.1nce.com/management-api/v1/inspect/devices', params: { page: '1', pageSize: '10' }, headers: { accept: 'application/json' } }; axios .request(options) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.error(error); }); ``` -------------------------------- ### POST /plugins/mender Source: https://help.1nce.com/dev-hub/openapi/1nce-os Installs the Mender plugin for 1NCE OS. Requires tenant token, private key, and public key. ```APIDOC ## POST /plugins/mender ### Description Installs the Mender plugin for 1NCE OS. Requires tenant token, private key, and public key. ### Method POST ### Endpoint /plugins/mender ### Parameters #### Request Body - **tenantToken** (string) - Required - Mender tenant token - **privateKey** (string) - Required - Mender private key - **publicKey** (string) - Required - Mender public key ### Request Example ```json { "tenantToken": "your_tenant_token", "privateKey": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----", "publicKey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----" } ``` ### Response #### Success Response (201) - **id** (string) - Plugin installation identifier - **partner** (string) - Partner name - **created** (string) - Plugin installation timestamp - **updated** (string) - Plugin installation update timestamp - **status** (string) - Status of the plugin installation - **tenantToken** (string) - Mender tenant token - **privateKey** (string) - Mender private key - **publicKey** (string) - Mender public key #### Response Example ```json { "privateKey": "privateKey", "partner": "MENDER", "created": "2022-03-07T08:51:29.015Z", "tenantToken": "tenantToken", "id": "mo3--1DzmAgO-X777AY9h", "publicKey": "publicKey", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED" } ``` ``` -------------------------------- ### Get Device Endpoints API Request Examples (Various Languages) Source: https://help.1nce.com/dev-hub/reference/iot-integrator Examples of how to request device endpoints from the 1NCE management API using different programming languages. These snippets demonstrate the basic structure for making the API call and handling the response. ```javascript // Node.js example (using fetch) const url = 'https://api.1nce.com/management-api/v1/integrate/devices/endpoints'; fetch(url, { method: 'GET', headers: { 'accept': 'application/json' } }) .then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return response.json(); }) .then(data => { console.log(data); }) .catch(error => { console.error('Error fetching device endpoints:', error); }); ``` ```python # Python example (using requests) import requests url = 'https://api.1nce.com/management-api/v1/integrate/devices/endpoints' headers = { 'accept': 'application/json' } try: response = requests.get(url, headers=headers) response.raise_for_status() # Raise an exception for bad status codes data = response.json() print(data) except requests.exceptions.RequestException as e: print(f"Error fetching device endpoints: {e}") ``` ```php ``` ```ruby # Ruby example (using Net::HTTP) require 'net/http' require 'uri' require 'json' uri = URI.parse('https://api.1nce.com/management-api/v1/integrate/devices/endpoints') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true # For HTTPS request = Net::HTTP::Get.new(uri.request_uri) request['accept'] = 'application/json' begin response = http.request(request) if response.code == '200' data = JSON.parse(response.body) puts data else puts "Error fetching device endpoints: HTTP Status #{response.code}" end rescue Net::HTTPError => e puts "HTTP Error: #{e.message}" rescue JSON::ParserError puts "Error parsing JSON response." end ``` -------------------------------- ### POST /plugins/tartabit Source: https://help.1nce.com/dev-hub/openapi/1nce-os Installs the Tartabit plugin for 1NCE OS. Requires server domain and webhook key. ```APIDOC ## POST /plugins/tartabit ### Description Installs the Tartabit plugin for 1NCE OS. Requires server domain and webhook key. ### Method POST ### Endpoint /plugins/tartabit ### Parameters #### Request Body - **serverDomain** (string) - Required - Tartabit IoT Bridge host domain. Must be a valid hostname. - **webhookKey** (string) - Required - Webhook Secret from service specification in Tartabit IoT Bridge. Must contain valid uri characters. ### Request Example ```json { "serverDomain": "iot.tartabit.com", "webhookKey": "your_webhook_secret" } ``` ### Response #### Success Response (201) - **id** (string) - Plugin installation identifier - **partner** (string) - Partner name - **created** (string) - Plugin installation timestamp - **updated** (string) - Plugin installation update timestamp - **status** (string) - Status of the plugin installation - **serverDomain** (string) - Tartabit IoT Bridge host domain - **webhookKey** (string) - Webhook Secret from service specification in Tartabit IoT Bridge #### Response Example ```json { "partner": "TARTABIT", "created": "2023-10-27T10:00:00.000Z", "id": "tartabit-plugin-123", "updated": "2023-10-27T10:00:00.000Z", "status": "INSTALLED", "serverDomain": "iot.tartabit.com", "webhookKey": "your_webhook_secret" } ``` ``` -------------------------------- ### Install Mender Plugin for 1NCE OS (JSON) Source: https://help.1nce.com/dev-hub/reference/post_v1-partners-mender-plugins API endpoint to set up Mender integration for firmware updates. Requires a tenant token and optionally accepts public and private keys. Returns installation details upon successful setup. ```json { "openapi": "3.0.1", "info": { "contact": { "email": "info@1nce.com", "name": "1NCE GmbH", "url": "https://1nce.com" }, "description": "Documentation of the 1NCE OS API which can be used for managing the 1NCE OS Service.", "title": "1NCE OS", "version": "v1.3" }, "servers": [ { "url": "https://api.1nce.com/management-api" } ], "tags": [ { "description": "1NCE OS Plugin System", "name": "Plugin system" } ], "paths": { "/v1/partners/MENDER/plugins": { "post": { "description": "Allows setting up an integration with Mender to allow seamless firmware update management via 1NCE OS CoAP proxy. Public and private keys are optional fields, but if they are used, both must be provided", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "A request to install the Mender plugin for 1NCE OS.", "properties": { "tenantToken": { "description": "Mender tenant token", "maxLength": 800, "minLength": 1, "type": "string" }, "privateKey": { "description": "Mender private key", "maxLength": 3000, "minLength": 1, "type": "string" }, "publicKey": { "description": "Mender public key", "maxLength": 1000, "minLength": 1, "type": "string" } }, "required": [ "tenantToken" ], "title": "Mender plugin installation", "type": "object", "x-readme-ref-name": "postschema_9" } } }, "description": "The request body to setup the Mender plugin.", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "additionalProperties": false, "description": "Response to the Mender plugin installation request.", "example": { "privateKey": "privateKey", "partner": "MENDER", "created": "2022-03-07T08:51:29.015Z", "tenantToken": "tenantToken", "id": "mo3--1DzmAgO-X777AY9h", "publicKey": "publicKey", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED" }, "properties": { "id": { "description": "Plugin installation identifier", "example": "mo3--1DzmAgO-X777AY9h", "type": "string" }, "partner": { "description": "Partner name", "example": "MENDER", "type": "string" }, "created": { "description": "Plugin installation timestamp", "example": "2022-03-07T08:51:29.015Z", "format": "date-time", "type": "string" }, "updated": { "description": "Plugin installation update timestamp", "example": "2022-03-07T08:51:29.015Z", "format": "date-time", "type": "string" }, "status": { "description": "Status of the plugin installation", "example": "INSTALLED", "type": "string" }, "tenantToken": { "description": "Mender tenant token", "type": "string" }, "privateKey": { "description": "Mender private key", "type": "string" }, "publicKey": { "description": "Mender public key", "type": "string" } }, "required": [ "created", "id", "partner", "privateKey", "publicKey", "status", "tenantToken", "updated" ], "title": "Plugin installation response", "type": "object" } } } } } } } } } ``` -------------------------------- ### Get Active Action Requests with Filters (Shell) Source: https://help.1nce.com/dev-hub/docs/device-controller-api Retrieves a list of active device action requests based on specified query parameters. This is helpful for monitoring ongoing or scheduled operations. The example shows how to get scheduled UDP requests for a particular device. ```shell curl -X GET "https://api.1nce.com/management-api/v1/integrate/devices/actions/requests/active?protocol=UDP&deviceId=123456789012345678&requestMode=SEND_WHEN_ACTIVE" ``` -------------------------------- ### Get Global Limits API Request (Ruby) Source: https://help.1nce.com/dev-hub/reference/volume-limits This snippet provides a Ruby example for fetching global limits from the 1NCE API. It uses the 'httparty' gem to perform the GET request. ```Ruby require 'httparty' url = 'https://api.1nce.com/management-api/v1/sims/limits' options = { headers: { 'accept': '*/*' } } response = HTTParty.get(url, options) puts response.body ``` -------------------------------- ### POST /v1/partners/MEMFAULT/plugins Source: https://help.1nce.com/dev-hub/openapi/1nce-os Allows setting up an integration with Memfault to enable seamless device debugging via the 1NCE OS CoAP proxy. ```APIDOC ## POST /v1/partners/MEMFAULT/plugins ### Description Installs the Memfault plugin for 1NCE OS, enabling device debugging capabilities. ### Method POST ### Endpoint /v1/partners/MEMFAULT/plugins ### Parameters #### Request Body - **(object)** - Required - The request body to setup the Memfault plugin. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (201) - **(object)** - Successful Memfault plugin installation response details. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### POST /partners/DATACAKE/plugins Source: https://help.1nce.com/dev-hub/docs/1nce-os-plugins-data-visualization-datacake Installs the Datacake plugin for 1NCE OS by associating a Datacake Workspace ID with the 1NCE OS platform. This allows for automatic device listing and data visualization in Datacake. ```APIDOC ## POST /partners/DATACAKE/plugins ### Description Installs the Datacake plugin for 1NCE OS. Requires the Workspace ID from Datacake to be provided in the request body. This enables data forwarding from 1NCE OS devices to Datacake for visualization. ### Method POST ### Endpoint /partners/DATACAKE/plugins ### Parameters #### Request Body - **workspaceId** (string) - Required - The unique Workspace ID obtained from your Datacake account. ### Request Example ```json { "workspaceId": "00000000-0000-0000-0000-000000000000" } ``` ### Response #### Success Response (200 or 201) - **message** (string) - Confirmation message indicating successful plugin installation. #### Response Example ```json { "message": "Datacake plugin installed successfully." } ``` #### Error Response - **400 Bad Request**: If the `workspaceId` is missing or invalid. - **409 Conflict**: If the Datacake plugin is already installed. ``` -------------------------------- ### GET /partners/plugins/{pluginId} Source: https://help.1nce.com/dev-hub/reference/get_v1-partners-plugins-pluginid Retrieves details about a specific Memfault plugin installation. This endpoint provides information such as installation status, associated email, and Memfault project ID. ```APIDOC ## GET /partners/plugins/{pluginId} ### Description Retrieves details about a specific Memfault plugin installation. This endpoint provides information such as installation status, associated email, and Memfault project ID. ### Method GET ### Endpoint /partners/plugins/{pluginId} #### Path Parameters - **pluginId** (string) - Required - The unique identifier of the plugin. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **created** (string) - Plugin installation creation timestamp. - **updated** (string) - Plugin installation update timestamp. - **status** (string) - Status of the plugin installation (e.g., "INSTALLED"). - **email** (string) - The email address used to create the Memfault organization. - **url** (string) - The Memfault login URL address. - **memfaultProjectId** (string) - Project ID saved in the Memfault System. #### Response Example ```json { "created": "2022-03-07T08:51:29.015Z", "updated": "2022-03-07T08:51:29.015Z", "status": "INSTALLED", "email": "john.doe@user.com", "url": "https://app.memfault.com/invites/.eJyrVkrNTczr4sdfsd", "memfaultProjectId": "34324-5434533fddgesdf-2sfdfsdfsf" } ``` #### Error Response (401) - **statusCode** (integer) - HTTP Response Code (401). - **statusText** (string) - HTTP Status Text ("Unauthorized"). - **errors** (array) - Detailed error information. #### Error Response Example (401) ```json { "statusCode": 401, "statusText": "Unauthorized", "errors": [ "{}", "{}" ] } ``` #### Error Response (403) - **statusCode** (integer) - HTTP Response Code (403). - **statusText** (string) - HTTP Status Text ("Forbidden"). - **errors** (array) - Detailed error information. #### Error Response Example (403) ```json { "statusCode": 403, "statusText": "Forbidden", "errors": [ "{}", "{}" ] } ``` ```