# Core JavaScript API

These objects are available to **every** connector function, whatever protocol the device speaks. Start
with the [JavaScript API](javascript_api/) — it explains what your script receives and what it must
produce — and come back here for the object you need.

## What you get and what you return

| Page | Object | Use it to |
|---|---|---|
| [JavaScript API](javascript_api/) | — | Understand the input variables, the expected output per connector function type, and how executions concatenate |
| [Entity](entity/) | `entity`, `gateway` | Read data stream values, timestamps and source fields of the device |
| [Inner Collections](inner_collections/) | `collection` | Collect data points and set fields from inside the script |
| [Operation Steps](operation_steps/) | `response` | Build operation steps and set result codes |

## Reaching back into the platform

| Page | Object | Use it to |
|---|---|---|
| [Operation](operation/) | `operation` | Read and activate the device's pending operations |
| [Provision](provision/) | `provision` | Retrieve and create entities through the provisioning API |
| [Concatenated Connector Functions](concatenated/) | `cf` | Chain `RESPONSE` and `COLLECTION` executions together |

## Helpers

| Page | Object | Use it to |
|---|---|---|
| [Utils](utils/) | `utils` | AT commands, date handling, context, encryption and HTTP helpers |
| [Cryptography](cryptography/) | — | Encrypt and decrypt with AES, hash with HMAC |

One more global is always there and is documented outside this section, because rules use the very same
object: **`logger`**, for writing `TRACE`, `DEBUG`, `INFO`, `WARN` and `ERROR` traces. It is the way to see
what a running function is doing — see [Debugging](../../../debugging/), which covers both the
[logger API](../../../debugging/logger_api/) and the
[WebSocket service](../../../debugging/functions_logger/) that streams the traces live.

{{% notice style="warning" title="Reserved names" icon="triangle-exclamation" %}}
Because these helpers are injected as globals, their names are reserved. Do not declare variables called
`cf`, `collection`, `response`, `snmp`, `utils`, `dlms`, `dlms_gas`, `provision` or `operation` in your
script.
{{% /notice %}}

{{% children sort="weight" %}}
