On this page
HTTP API point client
HTTP API point client maps resources on one HTTP/HTTPS origin to gateway variables. It supports JSON Pointer extraction, paged arrays, and writes with explicit business acknowledgement. See Collection Configuration for shared operations.
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| Devices, controllers or services exposing HTTP JSON APIs | Configure URL, authentication and JSON Pointer. The endpoint must return the expected JSON; configure write methods and request bodies for its API. |
Confirm one response in an API client
For a service at http://192.168.1.50:8080, first create GET /api/rooms/1 in Postman, the device API console or another HTTP client. Apply the service authentication and inspect the response:
{"data":{"temperature":23.5,"running":true},"success":true}Split the URL into device origin http://192.168.1.50:8080/ and variable path /api/rooms/1. A JSON pointer is a separate address field, not a URL fragment.
- Add this plugin under No channel. Match the API client’s authentication. None sends no managed credentials; Basic uses the username/password; Bearer uses the access token; ApiKey places that value in the configured header.
- Set default headers to
{"Accept":"application/json"}. For HTTPS, select a private CA when required; a client certificate is for mutual TLS and does not replace CA trust. - Add read-only
RoomTemperature, typeDouble, array length1. Enter path/api/rooms/1and value pointer/data/temperature:
{"path":"/api/rooms/1","pointer":"/data/temperature"}- Read the address in protocol debugging, then inspect the live variable. A source value of
23.5should produce the same value. Change the source and compare the new collection time. HTTP 200 alone does not ensure that the pointer exists or the value can be converted. - Map
runningto a separate Boolean with/data/running. Use Object and/datafor the complete object. JSON Pointer uses zero-based array indexes; it does not use$.data.temperatureJSONPath syntax.
| Authentication | Applicable fields |
|---|---|
| None | For an endpoint permitting anonymous access. |
| Basic | Username and Basic password, shared by this device’s requests. |
| Bearer | The service-issued access token; the plugin adds the Bearer header. It is not the gateway Web login token. |
| ApiKey | Put the key value in Access token and the service header name in API Key header. Do not duplicate it in ordinary headers. |
| OAuthClientCredentials | Configure the token endpoint, client ID, secret reference, Scope/Audience and client authentication described below. |
Confirm the write method, path and body shape with the service owner. For example, {"path":"/api/rooms/1/target","pointer":"/value","writeMethod":"PUT","writeSuccessPointer":"/success"} with a numeric write value 24.0 sends 24.0; it does not invent a {"target":24.0} wrapper. Supply an object when the API requires one, then check the business acknowledgement and read back.
Create a device and variables
Open Development Configuration → Collection Configuration and add an HTTP API point client device under No Channel. Configure the origin and authentication, save it, and enable it. The device manages its own HTTP connections.
| Parameter | Description |
|---|---|
| Origin | Absolute HTTP/HTTPS address without credentials or fragments. Variable paths start at the origin root. |
| Authentication | None, Basic, Bearer, ApiKey, or OAuthClientCredentials. Store credentials in device settings. |
| API key header | Header name for ApiKey; default X-API-Key. |
| Default headers JSON | String-valued object such as {"Accept":"application/json"}. Point headers override ordinary headers with the same name. |
| Client certificate / CA name | Managed HTTPS client certificate and private trust CA. Client certificates need a private key. An empty CA uses system trust; hostname validation always applies. |
| Use system proxy | Uses the runtime environment’s system proxy when enabled. |
| Request timeout | 100–120000 ms; default 5000. All pages share one deadline. |
| Maximum response bytes | 1–16777216; default 1048576. Also limits the cumulative raw body bytes of all pages. |
| Maximum parallel connections | 1–32; default 4. Queue time counts toward the deadline. |
| Default methods | GET/POST for reading; PUT/POST/PATCH/DELETE for writing. A variable can override them. |
OAuth machine authentication
Select OAuthClientCredentials and enter the HTTPS token endpoint, client ID and client secret reference in the form env:VARIABLE_NAME. A deployment administrator injects that variable into the gateway process. Device configuration and exports contain only the reference. The business origin must also use HTTPS. Certificate and proxy settings apply to the token connection as well.
Set Scope and Audience according to the authorization service contract. Basic client authentication is enabled by default (client_secret_basic); disable it for client_secret_post. The token timeout defaults to 10000 ms, and early refresh to 30 seconds, capped at half the token lifetime. The token service must return a Bearer access_token and numeric expires_in.
Concurrent reads within one device share a refresh, while separate devices retain separate tokens. Rotated secrets are resolved on the next refresh; restart the device to apply a rotation immediately. Stopping or replacing device configuration cancels the old refresh. Expired tokens are not reused after a refresh failure.
A GET receiving 401 may refresh and retry once. Writes and POST reads are never replayed automatically. Inspect the remote state before retrying an uncertain write. Cross-origin pagination and both business and token redirects are rejected. OAuth mode does not retain automatic session cookies.
Addresses and values
{"path":"/api/rooms/1?unit=celsius","pointer":"/data/temperature","readMethod":"GET","writeMethod":"PATCH","writePath":"/api/rooms/1","writeSuccessPointer":"/result/ok"}| Address field | Description |
|---|---|
| path / writePath | Same-origin path and query starting with /; writePath is optional. Cross-origin links, credentials, and fragments are rejected. |
| pointer | Empty string selects the root. /data/value selects a member; /items/0 selects an array element. Escape / as ~1 and ~ as ~0. |
| readMethod / readBody | Optional method override and JSON body. |
| writeMethod / contentType | Optional write method and media type; default application/json. |
| headers | String-valued point headers. Cannot override Authorization, API key, Cookie, Host, or transport-control fields. |
| writeSuccessPointer | When configured, must resolve to Boolean true. Without it, root success:false still fails the write. |
| pagination | nextPointer and maxPages (1–64; default 16). The value pointer must select an array. The next link must be same-origin; null or an empty string ends pagination. |
For a paged array:
{"path":"/api/items?page=1","pointer":"/items","headers":{"Accept":"application/json"},"pagination":{"nextPointer":"/next","maxPages":8}}Each page returns {"items":[...],"next":"/api/items?page=2"}, ending with null. Loops, excessive pages, or cumulative body limits fail the read without publishing a partial array. Pagination follows the configured body link rather than inferring tokens or Link headers.
Use numeric, Boolean, or String types for scalars and Object for arrays/objects. A String variable with an empty pointer can receive plain text. A write succeeds only after the required response acknowledgement.
- Add or edit a variable in Real-time Variables and open its address Field editor.
- Enter the path and value pointer. Enable overrides when needed; POST reads can include a JSON body.
- Enable array pagination and configure its pointer and page limit if needed. Configure optional write fields and ordinary headers.
- Confirm and fill back, review the JSON, save the variable, and reopen it to verify.
An unchecked field is absent and uses its default behavior. Explicit JSON null is a separate choice. Cancel discards field-editor changes. Authentication belongs in device settings.
Check real-time values
Inspect address, value, online state, collection time, change time, and error in Real-time Variables. Successful reads advance collection time. Arrays and objects show bounded summaries; use the debug read result for the complete paged value. After an authorized write, verify business acknowledgement, read back, and check the variable.
Protocol debugging and special methods
Select the device and open Protocol Debug. Core Status shows connection and request state, followed by Special Methods, read, batch read, and write tabs. Workspace Refresh updates status while retaining input and results. Resource pagination controls network requests separately from list pagination.
- Open Edit fields beside the resource address, enter the path, value pointer, and required overrides, then confirm and read once. Inspect the value and response time. Supported address JSON can also be entered directly.
- In Batch read, use Add and each item’s field editor for up to 32 addresses. Complete all drafts before reading and inspect every result independently.
- Confirm an authorized write target and body, execute, then read back. DELETE applies the remote deletion semantics.
- Cancel a pending operation if needed. A write already sent may still take effect remotely.
Status shows the most recent HTTP code and Retry-After when present; for example, 7 suggests waiting seven seconds. A later response without that header clears the hint. Check the operation result after 429 or business failure. Writes are not automatically replayed.
Paged reads show a merged array only after every page passes validation:

ReadAddressAsync, ReadAddressesAsync, and WriteAddressAsync share the same contract, authentication, certificates, and limits. Batch addresses is an array of address JSON strings. Enter parameters as a JSON array in method order, or use the field editor. For ReadAddressAsync:
["{\"path\":\"/status\",\"pointer\":\"/value\"}"]
Debug operations use the same address rules as variables. Pending or invalid field drafts prevent submission. Filling back changes only the debug input; it does not create variables or save device configuration.
Troubleshooting
| Symptom | Check and action |
|---|---|
| 401 / 403 | Check authentication, credentials, and origin permissions. |
| Connection or TLS failure | Check DNS, port, proxy, certificate validity, SAN hostname, and CA. |
| HTTP 200 but write failed | Check the Boolean business acknowledgement and root success field. |
| Missing pointer | Check JSON structure, case, array index, and escaping. |
| Pagination failure | Check terminal next value, same-origin links, loops, page count, and cumulative body budget. |
| Timeout / 429 / 5xx | Check server load and polling frequency. Read back before deciding whether to retry a write. |
Use gateway write APIs for inbound variable writes and forwarding plugins such as Webhook for outbound publishing. HTTP API point client actively collects remote APIs.