# Site
# IoT Project Code Standard
# Project Code (XXXXX)
Project code shall be reference from Oracle and Saleforce. In case, there is no project code avaliable. IoT Team will specified the unoffical project code in advance.
- BXXXX - Solar Project Code from Oracle
- SXXXX - Smart City Project
- EXXXX - EMS Project
- MXXXX - EV Project
- CXXXX - Ecoserve Project
- WXXXX - Wind project
# Site - List

This endpoint retrieves all sites of Project owner permission, that the API token owner has access to. This provides a view of most essential site data items such as site name, project code and IoT Hub channel.
# HTTP Request
GET {url}/sites
# Request Headers
| Key | Value |
|---|---|
| x-language | en |
| Authorization | Bearer {YOUR_API_TOKEN_HERE} |
# Response
When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.
| Parameter | Type | Description |
|---|---|---|
| count | Number | The count of sites in the client |
| _id | String | Site ID |
| siteName | String | Site name |
| code | String | Site project code |
| iotHubId | String | Azure IoT Hub channel |
{
"data": {
"data": {
"count": 3,
"sites": [
{
"_id": "60c8519f9a180d5228b80b34",
"siteName": "YOUR_SITE_NAME",
"code": "PROJECT_CODE",
"iotHubId": "6107ba55560aa012f53e0e83"
},
...
]
}
}
}
# Site - Get Site Info
This endpoint retrieves a specific id of the site.
HTTP Request
GET {url}/sites/:siteId
# Request Headers
| Key | Value |
|---|---|
| x-language | en |
# Request Params
| Parameter | Required | Type | Description |
|---|---|---|---|
| siteId | YES | String | Site ID |
# Response
When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.
| Parameter | Type | Description |
|---|---|---|
| _id | String | Site ID |
| siteName | String | Site name |
| code | String | Site project code |
| iotHubId | String | Azure IoT Hub channel |
{
"data": {
"_id": "60c8519f9a180d5228b80b34",
"siteName": "YOUR_SITE_NAME",
"code": "PROJECT_CODE",
"iotHubId": "6107ba55560aa012f53e0e83"
}
}
WARNING
The Site ID in the specified request ID does not match the site ID in database. Data is not found.