The REST connector provides tag-based read access and on-demand call access to any HTTP/REST API. Each configured tag maps to one HTTP request (method, endpoint, headers, body), polled continuously via ReadUpdate; the same request types are also available on demand via RunMethod for one-off calls outside the regular poll cycle.
Supports token-based authentication (auto-generated and refreshed against a separate token endpoint), Basic Auth, custom SSL/TLS certificate validation callbacks, and reading request parameters from an external JSON schema file rather than inline configuration.
| Name | Values | Description |
|---|---|---|
| Type | REST | The connector type identifier. |
| Endpoint | URL | Base URL of the REST API. |
| UpdateRate | milliseconds (integer) | How often configured GET-style tags are polled. Defaults to 1000. |
| PublishTags | comma-separated string | Optional list restricting which tags are actively published. |
| TokenAuthApi | URL | Optional token-generation endpoint, used when a tag/method has Usetoken set. |
| Tag Type | Address | Behaviour |
|---|---|---|
| Any standard tag | API path (relative to Endpoint) | Read on every cycle via the request type in Parameters[METHODTYPE] (defaults to GET) if IOType is not Out. |
| Parameter | Description |
|---|---|
| METHODTYPE | GET / PUT / POST / DELETE. Defaults to GET. |
| API | Overrides the request's API path/segment. |
| USERNAME / PASSWORD | Basic Auth credentials for this specific request. |
| JSON | Request body (PUT/POST), with ' characters replaced with " before sending. |
| URLPARAMS | Either a literal key=value query string, or a filename (read from config\Programs\dataSchemas\) whose contents are converted into a query string. |
| Name | Arguments | Description |
|---|---|---|
| GET / PUT / POST / DELETE | TAG, API, JSON (for PUT/POST) | Issues the request on demand. Passing the same TAG value again cancels any still-in-flight request for that tag before issuing the new one. |
A tag's Address is the endpoint path appended to Parameters[Endpoint]. Request behaviour (method, body, auth, query params) is controlled entirely through tag Parameters, not the address itself.
| Code | Type | Description |
|---|---|---|
| 1215 | Error | Failed to generate token |
| 1216 | Error | Failed to generate token (exception detail) |
| 1305 | Error | Error reading (request timed out / cancelled) |
| 1310-1312 | Error | Request cancelled after no response within configured delay |
| 1405 | Error | Unable to remove CancelToken |
| 1410 | Error | General RunMethod error |
| 1520 | Error | Run error |
| 2201 | Debug | Endpoint exists - No authtoken requested |
| 2219 | Debug | Cert callback |
| 2300 | Debug | ITag not present |
| 2313 | Debug | Inside putpostjsonmethod (trace) |
| 2314 | (log file only - see note below) | Schema loaded |
| 2315-2317 | Debug | Calling Get/Delete Async (trace) |
| 2320-2321 | Debug | jsonbody request / endpoint being called (trace) |
| 2323-2324 | Debug | Cancel Token removed / not removed |
| 2501-2503 | Debug | Get/Delete/Put-Post request cancelled due to new request being triggered |
| 3100 | Info | Started |
| 3322 | Info | Request succeeded |
Code 2314 ("Schema loaded") is logged via a direct log4net call rather than a published tag, since it occurs inside a static method that cannot reach the connector's tag-based ChangeData diagnostic path - it will appear in the connector's text log file only, not as a %INFO tag update.