<commit_before>// Module included in the following assemblies:
//
// assembly-iot-guide.adoc
// assembly-IoT.adoc

[id='assembly-iot-creating-device-{context}']
= Creating an IoT device

After installing the IoT services and creating an IoT project, you can create an IoT device for the device you want to monitor.

:headers: -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}"
ifeval::["{cmdcli}" == "oc"]
:registry: $(oc -n enmasse-infra get routes device-registry --template='{{ .spec.host }}')
endif::[]
ifeval::["{cmdcli}" == "kubectl"]
:registry: $(kubectl -n enmasse-infra get service iot-device-registry-external -o jsonpath={.status.loadBalancer.ingress[0].hostname}):31443
endif::[]

.Prerequisites
* link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#iot-installing-services-{context}[The IoT services are installed].
* link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#iot-creating-project-{context}[An IoT project is created].

include::../modules/proc-iot-register-new-device.adoc[leveloffset=+1]

include::../modules/proc-iot-set-username-password-device.adoc[leveloffset=+1]
<commit_msg>Docs:Edit {registry} variable (#4403)<commit_after>// Module included in the following assemblies:
//
// assembly-iot-guide.adoc
// assembly-IoT.adoc

[id='assembly-iot-creating-device-{context}']
= Creating an IoT device

After installing the IoT services and creating an IoT project, you can create an IoT device for the device you want to monitor.

:headers: -H 'Content-Type: application/json' -H "Authorization: Bearer ${TOKEN}"
ifeval::["{cmdcli}" == "oc"]
:registry: $(oc -n {ProductNamespace} get routes device-registry --template='{{ .spec.host }}')
endif::[]
ifeval::["{cmdcli}" == "kubectl"]
:registry: $(kubectl -n enmasse-infra get service iot-device-registry-external -o jsonpath={.status.loadBalancer.ingress[0].hostname}):31443
endif::[]

.Prerequisites
* link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#iot-installing-services-{context}[The IoT services are installed].
* link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#iot-creating-project-{context}[An IoT project is created].

include::../modules/proc-iot-register-new-device.adoc[leveloffset=+1]

include::../modules/proc-iot-set-username-password-device.adoc[leveloffset=+1]
{'fraction_non_alphanumeric': 0.16447368421052633, 'fraction_numerical': 0.008771929824561403, 'mean_word_length': 5.912121212121212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1561440', 'n_tokens_mistral': 754, 'n_tokens_neox': 708, 'n_words': 167}