This is a springboot serivce to activate the IoT devices to be available for sale.
The serice is using the getStaus and patch endpoints from the warehouse service to validate the device data before configuring the device.
- Java8 and mvn commands installed in the system
- Docker engine (optional)
The service is developed as a Maven project. To build and start the service run the following command in the application main directory
mvn clean install spring-boot:run
There is a dockerFile supplied in the repository to run the service in a container docker build -t .
Base URLs:
POST /dcs/activate
Body parameter
{
"serialNumber": "string"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ActivateDeviceDto | true | none |
Example responses
200 Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ResponseDto |
400 | Bad Request | Bad Request | ResponseDto |
404 | Not Found | Not Found | ResponseDto |
406 | Not Acceptable | Not Acceptable | ResponseDto |
500 | Internal Server Error | Internal Server Error | ResponseDto |
{
"success": true,
"message": "Device data is retrieved successfully",
"data": {}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
success | boolean | false | none | none |
message | string | false | none | none |
data | object | false | none | none |
Property | Value |
---|---|
message | Device data is retrieved successfully |
message | Device data is patched successfully |
message | Device is activated successfully |
message | Device not found |
message | Data validation failed |
message | Request contains invalid data |
message | Technical failure occurred, Please contact support team |
message | User doesn't have the required permission level to perform this action |
{
"serialNumber": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
serialNumber | string | false | none | none |