Actually our product is registered on the Cumulocity. Which is written in C/C++.
But I am trying to learn it and writing in python. I am trying to connect on the Cumulocity server. Our product is already one time registered but then I have deleted from the server. So it can consider as a fresh connection. I have deleted all the configuration of the particular product.
As per old product logs, I can see first basic authentication. We have to send URL, and ca-certificate to basic handshake (Means includes TLS1.2 or TLS1.3 authentication).
As a second step we have to send the payload in the rest API format and that is as bootstrapagent.
Which I am not able to do. Due to lack of knowledge in the REST API.
For that we are using below macros
BOOTSTRAP_HOST = “”
BOOTSTRAP_PORT = 8883
BOOTSTRAP_TENANT = “”
BOOTSTRAP_USERNAME = “”
BOOTSTRAP_CLIENT_ID = "“
PRODUCT_SERIAL_NO = ““
Internally userid = tanentId/bootsrapusername;
So by using above credential I am trying to do the request.
Once the request reach the Cumulocity and accept it. I will get the new details of user id and password for the connection.
I am trying since last few days.
But I have limited knowledge of REST so lagging in the coding part.
I think to properly help you need to clarify a few things.
What is “our product”? A device? A system?
What did you mean with “registered on Cumulocity”?
So from what I understood: You are trying to register a device to Cumulocity and implement an agent that supports the bootstrapping process via REST?
Did you check this documentation?
In short you need to use the bootstrap credentials of your instance to send a POST to /devicecontrol/deviceCredentials with a body containing your id you used to register your device.
In the response you will get credentials which you should store locally.
In all other requests of the API you need to use the provided credentials to authenticate your requests.
It’s not a programming language question, but how you are implementing it.
In general: If you don’t provide code snippets, I don’t think the community can help you because it is not clear what your problem currently is.