Skip to content

Commit c7ec84b

Browse files
committed
treewide: Remove nRF Cloud REST
Deprecated from nRF Cloud libraries. Removing references and samples. Signed-off-by: Pascal Hernandez <pascal.hernandez@nordicsemi.no>
1 parent 726b350 commit c7ec84b

152 files changed

Lines changed: 683 additions & 6019 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/test-spec.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@
432432
- "include/net/nrf_cloud_location.h"
433433
- "include/net/nrf_cloud_os.h"
434434
- "include/net/nrf_cloud_pgps.h"
435-
- "include/net/nrf_cloud_rest.h"
436435
- "include/net/rest_client.h"
437436
- "lib/at_monitor/**/*"
438437
- "lib/at_shell/**/*"
@@ -466,7 +465,6 @@
466465
- "include/net/nrf_cloud_location.h"
467466
- "include/net/nrf_cloud_os.h"
468467
- "include/net/nrf_cloud_pgps.h"
469-
- "include/net/nrf_cloud_rest.h"
470468
- "include/net/rest_client.h"
471469
- "lib/at_monitor/**/*"
472470
- "lib/date_time/**/*"

doc/_zoomin/ncs.tags.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,6 @@ mapping_topics:
383383
- nrf/samples/cellular.html: ["lte"]
384384
- nrf/samples/cellular/*.html: ["lte"]
385385
- nrf/samples/cellular/nrf_cloud_multi_service/README.html: ["nrf-cloud"]
386-
- nrf/samples/cellular/nrf_cloud_rest_device_message/README.html: ["nrf-cloud"]
387-
- nrf/samples/cellular/nrf_cloud_rest_cell_location/README.html: ["nrf-cloud"]
388-
- nrf/samples/cellular/nrf_cloud_rest_fota/README.html: ["nrf-cloud"]
389386
- nrf/samples/cellular/modem_shell/README.html: ["at-commands"]
390387
- nrf/samples/cellular/at_client/README.html: ["at-commands"]
391388
- nrf/samples/dect/*.html: ["dect-nr+"]
@@ -426,7 +423,6 @@ mapping_topics:
426423
- nrf/libraries/networking/nrf_cloud_location.html: ["nrf-cloud"]
427424
- nrf/libraries/networking/nrf_cloud_log.html: ["nrf-cloud"]
428425
- nrf/libraries/networking/nrf_cloud_pgps.html: ["nrf-cloud"]
429-
- nrf/libraries/networking/nrf_cloud_rest.html: ["nrf-cloud"]
430426
- nrf/libraries/networking/nrf_provisioning.html: ["at-commands"]
431427
- nrf/libraries/networking/softap_wifi_provision.html: ["wifi", "nrf70-series", "nrf7002",
432428
"nrf7001", "nrf7000"]

doc/nrf/external_comp/nrf_cloud.rst

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ You can use the services offered by nRF Cloud in the following scenarios:
3838

3939
The website or application interacts with the `nRF Cloud REST API`_ to display device data and manage it in a customized way.
4040

41-
* Device connected to nRF Cloud over REST.
42-
43-
The device uses the services by interacting with the `nRF Cloud REST API`_.
44-
4541
* Device connected to a customer cloud service in a suitable manner.
4642

4743
The services can be used from the customer cloud service that communicates over REST to interact with the `nRF Cloud REST API`_ in a proxy configuration.
@@ -94,7 +90,7 @@ Before running the script, you must install and run firmware on the device that
9490

9591
If the device already contains certificates, delete the old certificates from the device by adding the ``--delete`` option.
9692

97-
Choosing a protocol: CoAP, MQTT or REST
93+
Choosing a protocol: CoAP and MQTT
9894
***************************************
9995

10096
When choosing a protocol, consider the following:
@@ -105,11 +101,9 @@ When choosing a protocol, consider the following:
105101
* What are the network data usage requirements for the device?
106102
* What are the carrier's network settings (NAT timeout, eDRX/PSM) and how will the settings affect device behavior?
107103

108-
MQTT has a higher (data/power) cost to set up a connection than CoAP or REST.
109-
However, the data size of an MQTT publish event is smaller than a comparable REST transaction.
110-
The data size of a CoAP transfer can be the smallest of all.
104+
MQTT has a higher (data/power) cost to set up a connection than CoAP.
105+
The data size of a CoAP transfer is smaller than MQTT.
111106
MQTT may be preferred if a device is able to maintain a connection to the broker and sends/receives data frequently.
112-
REST may be preferred if a device sends data infrequently or does not need to receive unsolicited data from the cloud.
113107
CoAP may be preferred if a device sends data infrequently, does not need to receive unsolicited data from the cloud, and must use the least amount of cellular data and the least amount of power.
114108

115109
CoAP overview
@@ -121,15 +115,6 @@ CoAP overview
121115
The JWT is approximately 450 bytes.
122116
* Each CoAP transaction contains a CoAP header and API-specific payload.
123117

124-
REST overview
125-
=============
126-
127-
* The device initiates a TLS connection to nRF Cloud.
128-
* nRF Cloud supports a connection keep-alive/idle time of 60 seconds for REST API sockets.
129-
* For authentication, the device must send a JSON Web Token (JWT) with each REST transaction.
130-
The JWT is approximately 450 bytes, but can be larger depending on the claims.
131-
* Each REST transaction contains HTTP headers, including the JWT, and any API specific payload.
132-
133118
MQTT overview
134119
=============
135120

@@ -142,7 +127,7 @@ MQTT overview
142127
Security
143128
********
144129

145-
A device can successfully connect to `nRF Cloud`_ using CoAP or REST if the following requirements are met:
130+
A device can successfully connect to `nRF Cloud`_ using CoAP if the following requirements are met:
146131

147132
* The device contains a correct x509 CA certificate, and private key.
148133
* The public key derived from the private key is registered with an nRF Cloud account.
@@ -177,7 +162,7 @@ A device can successfully connect to `nRF Cloud`_ using MQTT if the following re
177162

178163
* Preconnect provisioning
179164

180-
This is supported by CoAP, MQTT, and REST connections.
165+
This is supported by CoAP and MQTT connections.
181166

182167
1. Run the `device_credentials_installer.py`_ Python script to create and install credentials on the device:
183168

@@ -197,7 +182,7 @@ A device can successfully connect to `nRF Cloud`_ using MQTT if the following re
197182
|NCS| library support
198183
*********************
199184

200-
The |NCS| provides the :ref:`lib_nrf_cloud` library, which if enabled, allows you to connect your devices to nRF Cloud and use the update, location, and connectivity services using MQTT or REST.
185+
The |NCS| provides the :ref:`lib_nrf_cloud` library, which if enabled, allows you to connect your devices to nRF Cloud and use the update, location, and connectivity services using MQTT or CoAP.
201186

202187
For more information on the various services, see the following documentation:
203188

@@ -213,21 +198,19 @@ Applications and samples
213198

214199
The following sample demonstrates nRF Cloud-specific functionality using CoAP:
215200

216-
* :ref:`nrf_cloud_multi_service`
217-
* :ref:`modem_shell_application`
201+
* :ref:`nrf_cloud_coap_device_message`
202+
* :ref:`nrf_cloud_coap_cell_location`
203+
* :ref:`nrf_cloud_coap_fota`
218204

219205
The following sample demonstrates nRF Cloud-specific functionality using MQTT:
220206

221-
* :ref:`nrf_cloud_multi_service`
222-
223-
The following samples demonstrate nRF Cloud-specific functionality using REST:
224-
225-
* :ref:`nrf_cloud_rest_fota`
226-
* :ref:`nrf_cloud_rest_device_message`
227-
* :ref:`nrf_cloud_rest_cell_location`
207+
* :ref:`nrf_cloud_mqtt_device_message`
208+
* :ref:`nrf_cloud_mqtt_cell_location`
209+
* :ref:`nrf_cloud_mqtt_fota`
228210

229211
Other related samples and applications that use nRF Cloud services:
230212

231213
* :ref:`gnss_sample`
232214
* :ref:`modem_shell_application`
233215
* :ref:`location_sample`
216+
* :ref:`nrf_provisioning_sample`

doc/nrf/libraries/modem/location.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ The supported location methods are as follows:
3636
* A-GNSS and P-GPS are managed with :ref:`lib_nrf_cloud_agnss` and :ref:`lib_nrf_cloud_pgps`.
3737
* The application may also use some other source for the data and use :c:func:`location_agnss_data_process` and :c:func:`location_pgps_data_process` to pass the data to the Location library.
3838
* The data format of A-GNSS or P-GPS must be as received from :ref:`lib_nrf_cloud_agnss`.
39-
* The data transport method for :ref:`lib_nrf_cloud_agnss` and :ref:`lib_nrf_cloud_pgps` can be configured to be either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or REST (:kconfig:option:`CONFIG_NRF_CLOUD_REST`).
40-
If different transport is desired for different location methods, (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) and (:kconfig:option:`CONFIG_NRF_CLOUD_REST`) can be enabled simultaneously. In such a case, MQTT takes
41-
precedence as the transport method of GNSS assistance data.
39+
* The data transport method for :ref:`lib_nrf_cloud_agnss` and :ref:`lib_nrf_cloud_pgps` can be configured to be either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or CoAP (:kconfig:option:`CONFIG_NRF_CLOUD_COAP`).
4240
* Note that acquiring GNSS fix only starts when LTE connection, more specifically Radio Resource Control (RRC) connection, is idle.
4341
Also, if A-GNSS is not used and Power Saving Mode (PSM) is enabled, the Location library will wait for the modem to enter PSM.
4442
* Selectable location accuracy (low/normal/high).
@@ -76,7 +74,7 @@ Here are details related to the services handling cell information for cellular
7674

7775
* Services can be handled by the application by enabling the :kconfig:option:`CONFIG_LOCATION_SERVICE_EXTERNAL` Kconfig option, in which case rest of the service configurations are ignored.
7876
* The service is selected in the :c:struct:`location_method_config` structure when requesting for location.
79-
* You can configure the data transport method for the `nRF Cloud Location Services <nRF Cloud Location Services documentation_>`_ to either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or REST (:kconfig:option:`CONFIG_NRF_CLOUD_REST`).
77+
* You can configure the data transport method for the `nRF Cloud Location Services <nRF Cloud Location Services documentation_>`_ to either MQTT (:kconfig:option:`CONFIG_NRF_CLOUD_MQTT`) or CoAP (:kconfig:option:`CONFIG_NRF_CLOUD_COAP`).
8078

8179
Diagrams
8280
========
@@ -192,7 +190,7 @@ nRF Cloud certificates
192190
======================
193191

194192
When using nRF Cloud for any location data, you must have the certificate provisioned.
195-
An nRF91 Series DK comes pre-provisioned with certificates for nRF Cloud.
193+
To provision and onboard your device, install `nRF Cloud Utils`_ and follow the instructions in the README.
196194

197195
Location service accounts
198196
=========================
@@ -269,7 +267,7 @@ Configuring the obstructed visibility detection is always a tradeoff between pow
269267

270268
To enable the transport method, set the :kconfig:option:`CONFIG_NRF_CLOUD` Kconfig option and select one of the following options:
271269

272-
* :kconfig:option:`CONFIG_NRF_CLOUD_REST` - Uses REST APIs to communicate with `nRF Cloud`_ if :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` is not set.
270+
* :kconfig:option:`CONFIG_NRF_CLOUD_COAP` - Uses CoAP transport to communicate with `nRF Cloud`_.
273271
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` - Uses MQTT transport to communicate with `nRF Cloud`_.
274272

275273
Both cellular and Wi-Fi location services are handled externally by the application or selected using the runtime configuration, in which case you must first configure the available services.
@@ -384,7 +382,7 @@ This library uses the following |NCS| libraries:
384382
* :ref:`lib_nrf_cloud`
385383
* :ref:`lib_nrf_cloud_agnss`
386384
* :ref:`lib_nrf_cloud_pgps`
387-
* :ref:`lib_nrf_cloud_rest`
385+
* :ref:`lib_nrf_cloud_coap`
388386

389387
It uses the following `sdk-nrfxlib`_ library:
390388

doc/nrf/libraries/networking/nrf_cloud.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ The current implementation supports the following technologies:
1313

1414
* GNSS, TEMP, and other application-specific sensor data
1515
* Cellular and Wi-Fi® location data
16-
* TLS-secured MQTT, TLS-secured REST, or DTLS-secured CoAP as the communication protocol
17-
* JSON as the data format for MQTT and REST
16+
* TLS-secured MQTT or DTLS-secured CoAP as the communication protocol
17+
* JSON as the data format for MQTT
1818
* CBOR and JSON as the data format for CoAP
1919

2020
.. note::
2121
The remainder of this document describes the nRF Cloud library's MQTT connectivity support.
22-
See the :ref:`lib_nrf_cloud_rest` library and the :ref:`lib_nrf_cloud_coap` library for other connectivity options.
22+
See the :ref:`lib_nrf_cloud_coap` library for extended information on CoAP connectivity.
2323

2424
.. _lib_nrf_cloud_init:
2525

@@ -118,7 +118,7 @@ Firmware over-the-air (FOTA) updates
118118
The nRF Cloud library supports FOTA updates for your nRF91 Series device.
119119
The :kconfig:option:`CONFIG_NRF_CLOUD_FOTA` Kconfig option is enabled by default when :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` is set.
120120
This enables FOTA functionality in the application.
121-
FOTA support for applications using CoAP or REST is enabled with the :kconfig:option:`CONFIG_NRF_CLOUD_FOTA_POLL` Kconfig option.
121+
FOTA support for applications using CoAP is enabled with the :kconfig:option:`CONFIG_NRF_CLOUD_FOTA_POLL` Kconfig option.
122122

123123
nRF Cloud FOTA enables the following additional features and libraries:
124124

@@ -222,7 +222,7 @@ The following enhancements to this library can be used to interact with `nRF Clo
222222
* Assisted GNSS - :ref:`lib_nrf_cloud_agnss`
223223
* Predicted GPS - :ref:`lib_nrf_cloud_pgps`
224224
* Cellular Positioning - :ref:`lib_nrf_cloud_cell_pos`
225-
* nRF Cloud REST - :ref:`lib_nrf_cloud_rest`
225+
* Wi-Fi® Positioning - :ref:`lib_nrf_cloud_wifi_pos`
226226

227227
.. _nrf_cloud_api:
228228

@@ -248,7 +248,7 @@ nRF Cloud common definitions
248248
249249
.. doxygengroup:: nrf_cloud_defs
250250

251-
nRF Cloud FOTA poll for REST and CoAP
251+
nRF Cloud FOTA poll for CoAP
252252
****************************************
253253

254254
| Header file: :file:`include/net/nrf_cloud_fota_poll.h`

doc/nrf/libraries/networking/nrf_cloud_agnss.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Configuration
3131
To enable this library, set the :kconfig:option:`CONFIG_NRF_CLOUD` Kconfig option and configure the following options:
3232

3333
* :kconfig:option:`CONFIG_NRF_CLOUD_AGNSS`
34-
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT`, :kconfig:option:`CONFIG_NRF_CLOUD_REST`, or :kconfig:option:`CONFIG_NRF_CLOUD_COAP`
34+
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` or :kconfig:option:`CONFIG_NRF_CLOUD_COAP`
3535

3636
See :ref:`configure_application` for information on how to change configuration options.
3737

@@ -45,8 +45,6 @@ A-GNSS data can be requested using one of the following methods:
4545

4646
If :kconfig:option:`CONFIG_NRF_CLOUD_MQTT` is enabled, the :c:func:`nrf_cloud_agnss_request` function is used to request by type, and the :c:func:`nrf_cloud_agnss_request_all` function is used to return all available assistance data.
4747

48-
If :kconfig:option:`CONFIG_NRF_CLOUD_REST` is enabled, the :c:func:`nrf_cloud_rest_agnss_data_get` function is used to request A-GNSS data.
49-
5048
If :kconfig:option:`CONFIG_NRF_CLOUD_COAP` is enabled, the :c:func:`nrf_cloud_coap_agnss_data_get` function is used to request A-GNSS data.
5149

5250
When nRF Cloud responds with the requested A-GNSS data, the :c:func:`nrf_cloud_agnss_process` function processes the received data.

doc/nrf/libraries/networking/nrf_cloud_log.rst

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ The logging backend can either use JSON encoding or `Dictionary-based Logging`_
1616
Overview
1717
********
1818

19-
This library provides an API for REST-, MQTT-, or CoAP-based applications to send logs to nRF Cloud.
19+
This library provides an API for MQTT- or CoAP-based applications to send logs to nRF Cloud.
2020
For MQTT- and CoAP-based applications, you can enable or disable logging as well as change the logging level remotely using the nRF Cloud portal or `nRF Cloud Patch Device State`_ REST API.
21-
For REST-based applications, the enabled state and logging level can be controlled at compile time or at run time on the device, but not from the cloud.
2221

2322
Each JSON log message contains the following elements:
2423

@@ -55,7 +54,7 @@ The sequence number is set to a monotonically-increasing value that resets to ``
5554
Supported backends
5655
==================
5756

58-
When so configured, this library includes a Zephyr logging backend that can transport log messages to nRF Cloud using REST, MQTT, or CoAP.
57+
When so configured, this library includes a Zephyr logging backend that can transport log messages to nRF Cloud using MQTT or CoAP.
5958
The logging backend can also use either JSON messages or dictionary-based compact binary messages.
6059

6160
Multiple JSON log messages are sent together as a JSON array to the `d2c/bulk device message topic <nRF Cloud MQTT Topics_>`_.
@@ -70,7 +69,6 @@ Requirements
7069
************
7170

7271
The device must be connected to nRF Cloud before calling the :c:func:`nrf_cloud_log_send` function.
73-
The :c:func:`nrf_cloud_rest_log_send` function initiates the connection as needed.
7472

7573
Configuration
7674
*************
@@ -82,7 +80,7 @@ To enable direct log messages or the logging backend, set the :kconfig:option:`C
8280

8381
If only the first is enabled:
8482

85-
* Calls to the direct log message functions :c:func:`nrf_cloud_log_send` and :c:func:`nrf_cloud_rest_log_send` send messages direct to nRF Cloud immediately.
83+
* Calls to the direct log message function :c:func:`nrf_cloud_log_send` send messages direct to nRF Cloud immediately.
8684
* The cloud logging backend is not available, and consequently, no Zephyr log messages are transmitted to the cloud.
8785

8886
If only the second is enabled:
@@ -95,7 +93,6 @@ If both options are enabled, calls to the direct log message functions are passe
9593
Configure one of the following Kconfig options to select the data transport method:
9694

9795
* :kconfig:option:`CONFIG_NRF_CLOUD_MQTT`
98-
* :kconfig:option:`CONFIG_NRF_CLOUD_REST`
9996
* :kconfig:option:`CONFIG_NRF_CLOUD_COAP`
10097

10198
Configure the message encoding:
@@ -141,29 +138,24 @@ Usage
141138
To use this library, complete the following steps:
142139

143140
1. Include the :file:`nrf_cloud_log.h` file.
144-
#. If the :kconfig:option:`CONFIG_NRF_CLOUD_LOG_DIRECT` Kconfig option is enabled, call the :c:func:`nrf_cloud_log_send` function when connected to nRF Cloud using MQTT or CoAP, or call :c:func:`nrf_cloud_rest_log_send` when using REST.
141+
#. If the :kconfig:option:`CONFIG_NRF_CLOUD_LOG_DIRECT` Kconfig option is enabled, call the :c:func:`nrf_cloud_log_send` function when connected to nRF Cloud using MQTT or CoAP.
145142
#. If the :kconfig:option:`CONFIG_NRF_CLOUD_LOG_BACKEND` option is enabled, use the normal Zephyr logging macros :c:macro:`LOG_ERR`, :c:macro:`LOG_WRN`, :c:macro:`LOG_INF`, or :c:macro:`LOG_DBG`, as well as the ``_HEXDUMP_ forms``.
146143

147144
Samples using the library
148145
*************************
149146

150147
The following |NCS| samples use this library:
151148

152-
* :ref:`nrf_cloud_multi_service`
153-
* :ref:`nrf_cloud_rest_device_message`
154-
155-
Limitations
156-
***********
157-
158-
For REST-based applications, you can disable or set a log level for logs only at compile time.
149+
* :ref:`nrf_cloud_mqtt_device_message`
150+
* :ref:`nrf_cloud_coap_device_message`
159151

160152
Dependencies
161153
************
162154

163155
This library uses the following |NCS| libraries:
164156

165157
* :ref:`lib_nrf_cloud`
166-
* :ref:`lib_nrf_cloud_rest`
158+
* :ref:`lib_nrf_cloud_mqtt`
167159
* :ref:`lib_nrf_cloud_coap`
168160
* :ref:`lib_date_time`
169161

0 commit comments

Comments
 (0)