Overview
Introduction
The carbonTRACK API endpoint prefix is https://apiv2.carbontrack.com.au/
The API provides programmatic access to much of the data found in carbonTRACK. It deals with a few types objects and associated data:
- Distributors: a distributor is a container for customers. It contains information about distributor username and distributor identifier.
- Customers: a customer is a container for devices. It contains information about customer name, timezone, and other metadata found in carbonTRACK.
- Devices: a device represents a physical device installed for a customer. A device can have multiple measurements.
- Measurement: a measurement is a value generated by a device.
Data is returned in JSON.
Postman
Postman is a tool for interacting with APIs. Download the tool from their website to more easily interact with the carbonTRACK API. Once you have the application installed, click the button below to interact with the carbonTRACK API using Postman. This button will open the Postman app with a configured Collection and Environment. For everything to work properly, be sure to update the carbonTRACK External API.template Postman Environment with your own API credentials. To do this, make sure carbonTRACK External API.template is selected in the dropdown in the upper-right hand corner of Postman. Then, click the eye button to the right of it, then choose edit. Fill in the values for each variable with your own information. You do not need to fill out refresh_token and access_token – those will be automatically filled as you interact with the API via the carbonTRACK API Collection in Postman.
Versioning
The API is globally versioned for all endpoints. With this version, you can trust that we will never remove or change the existing structure of requests and responses. However, we may add new fields and query parameters. In addition, we may change the values that are returned while maintaining the response structure.
Changelog
2019-05-13
- Added additional details to each of the API end points
2019-04-29
- Reformatted the look and feel of the API Documentation tool
API Basics
API Basics Overview
The carbonTRACK family of REST APIs provide simple RESTful interfaces with lightweight JSON-formatted responses that allow you to use carbonTRACK's datasets, our calculators, and all other functionality provided by our products.
This section of the documentation is geared towards developers and covers the basics of using any of our REST APIs.
- REST Request - how to send a request including the domains, paths, and HTTP Method conventions we use. Also includes details on the common parameters for pagination, filtering and sorting.
- REST Response - we have a standard response wrapped, which is detailed here. We also talk about HTTP status codes and how we return error messages.
- Security - how to authenticate yourself, with examples for various technologies
- Versioning and Releases - how we version our APIs
- API SandBox - a developer sandbox where you can test integration to our APIs.
Requests
Request URLs
Our API server can be found at:
The API requests follow the pattern:
- https://apiv2.carbontrack.com.au/ctapi/(the resource path)
Here are examples of the calls to four of our major API endpoints:
- https://apiv2.carbontrack.com.au/ctapi/Distributor
- https://apiv2.carbontrack.com.au/ctapi/Customer
- https://apiv2.carbontrack.com.au/ctapi/Device
- https://apiv2.carbontrack.com.au/ctapi/Measurement
Each API endpoint has a documentation page that describes the endpoint and the applicable URL for that resource.
Authentication Request
Each request needs to contain information that identifies you as the client. Further detail can be found on the Security page.
Data Types
In addition to standard string and number inputs, we utilize additional input types within our APIs
Array Inputs
An Array of Device IDs to get Measurements. Example: ['898797978949029','898797978949030']
HTTP Methods
The majority of calls to the API will be via HTTP GET since you will be requesting one or more resources. However, some operations require other HTTP methods:
| Parameter | Description |
|---|---|
| GET | Reads resources via URL, often with query string criteria |
| POST | Create a new resource, or with parameter method |
Pagination
To help control the quantity of response data returned in an API call, we support Page and RecordCount request parameters. The majority of calls to the API will allow for the use of pagination since you will be requesting one or more resources. Below are the fields available on the response for each endpoint:
| Parameter | Value | Description |
|---|---|---|
| Page | Integer | The index of the first result |
| PageSize | Integer | Selects the the number of Records per Page |
| RecordCount | Integer | The number of results |
For example, you can fetch the first 100 results by setting Page to 1 and a PageSize to 100. To fetch the second 100 results, set Page to 2 and PageSize to 100.
You can tell how many results matched your query by looking at the RecordCount property that is returned in every response back from the API.
Searching and Sorting
Searching for data offers very flexible options for inputs as well as sorting. You can search for text within one or more fields. You can order your results using a prioritized list of fields, each with their own distinction of ascending or descending. Below are the options you can specify when searching, all of which are optional:
| Parameter | Value | Description |
|---|---|---|
| FromUTCDate | Integer | The start date and time in UTC format |
| ToUTCDate | Integer | The end date and time in UTC format |
Using SSL
All API methods must be called over SSL. Make sure your client technology supports SSL (most common REST capable client languages and technologies can).
Responses
Response Formats
All responses are returned using JSON.
HTTP Status Codes
Our REST API uses standard HTTP status codes to indicate success or failure of API calls.
In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information, and codes in the 5xx range indicate an error with carbonTRACK's servers.
Here are the basic status codes that we return:
| HTTP Code | Message | Description |
|---|---|---|
| 200 | Ok | The request was processed and returned successfully. |
| 400 | Bad Request | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). |
| 401 | Unauthorized | Authentication failed. Check that your authentication credentials are correct. |
| 403 | Forbidden | The request you are making is valid, but you do not have permission to access the entity requested. Authenticating will make no difference. Double check the entity ID that you are requesting. |
| 404 | Not Found | The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible. |
| 429 | Too Many Requests | The user has sent too many requests in a given amount of time. See information regarding rate limiting. |
| 500 | Server Error | Please contact our support team with details about the error received. We log and review all errors but your help often helps us fix it quicker. |
| 503 | Service Unavailable | Our API is down. Please try again. |
Errors
Errors are communicated to the client in the payload of the response.
The standard response payload can contain errors. This will give more finely grained details about what specifically caused the error or errors, which should allow you to respond appropriately.
Security
Simple Authentication
This is the solely supported authentication scheme. You need to supply a UserID and Password as part of the request either via headers or the query string.
To authenticate, pass in your UserID and Password in the request header.
Versioning
The API is globally versioned for all endpoints. With this version, you can trust that we will never remove or change the existing structure of requests and responses. However, we may add new fields and query parameters. In addition, we may change the values that are returned while maintaining the response structure.
Examples of possible changes within a version are shown on the right.
API Sandbox
We have provided a sandbox where you can utilise your authentication credentials to test the API endpoints.
You can find the API Sandbox here: https://apiv2.carbontrack.com.au/home/apisandbox
Authentication Introduction
The authentication mechanism is based off of the OAuth 2.0 guidelines. Once an access_token is received, it must be used with all subsequent non-authentication API requests.
Authentication Object
| Attribute | Type | Description | Always Returned? |
|---|---|---|---|
| access_token | String | Randomly generated string to serve as authentication token for subsequent requests | yes |
| issued_at | Integer | Unix timestamp for when access_token was issued | yes |
| token_type | String | The type of the token being returned | yes |
| expires_in | Integer | Seconds until the access_token expires | yes |
| refresh_token | String | Randomly generated string. This can be used to obtain more access tokens instead of supplying a username and password | no. Only returned for password grant type. |
Resource Owner Password
The API uses the (OAuth 2.0 Resource Owner Password Credentials flow)(https://tools.ietf.org/html/rfc6749#section-6). If successful, an access_token is returned with an accompanying refresh_token. Once the access_token expires, you can refresh it by using the refresh_token.
Definition
POST /oauth/token
Arguments
| Parameter | Required? | Default | Description |
|---|---|---|---|
| grant_type | yes | The string "password". This defines the OAuth 2.0 flow. | |
| username | yes | The user's username | |
| password | yes | The user's password |
Refreshing an Access Token
The API uses the (OAuth 2.0 guidelines for refreshing an access token)(https://tools.ietf.org/html/rfc6749#section-6). If successful, an access_token is returned with an accompanying refresh_token. Once the access_token expires, you can refresh it by using the refresh_token.
Definition
POST /oauth/token
Arguments
| Parameter | Required? | Default | Description |
|---|---|---|---|
| grant_type | yes | The string "refresh_token”. This defines the OAuth 2.0 flow. | |
| refresh_token | yes | The refresh_token from a previously successful authentication attempt. | |
| username | yes | The user's username | |
| password | yes | The user's password |
carbonTRACK API v1
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Authentication
-
oAuth2 authentication. OAuth2 Implicit Grant
- Flow: implicit
- Authorization URL = http://apiv2.carbontrack.com.au/oauth/authorize
- Token URL = http://apiv2.carbontrack.com.au/token
| Scope | Scope Description |
|---|---|
| read | Read access to protected resources |
| write | Write access to protected resources |
Customer
Customer_GetCustomers
Code samples
# You can also use wget
curl -X GET http://apiv2.carbontrack.com.au/ctapi/Customer \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET http://apiv2.carbontrack.com.au/ctapi/Customer HTTP/1.1
Host: apiv2.carbontrack.com.au
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: 'http://apiv2.carbontrack.com.au/ctapi/Customer',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('http://apiv2.carbontrack.com.au/ctapi/Customer',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get 'http://apiv2.carbontrack.com.au/ctapi/Customer',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('http://apiv2.carbontrack.com.au/ctapi/Customer', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://apiv2.carbontrack.com.au/ctapi/Customer");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://apiv2.carbontrack.com.au/ctapi/Customer", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://apiv2.carbontrack.com.au/ctapi/Customer', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /ctapi/Customer
Gets List of Customers and there Devices.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| customerRequest.customerRef | string | Customer External Reference ID | false |
| customerRequest.phone | string | Customer Phone | false |
| customerRequest.address | string | Address location | false |
| customerRequest.page | integer(int32) | Paging records page index | false |
| customerRequest.pageSize | integer(int32) | Number records returned per page | false |
Example responses
200 Response
{
"RecordCount": 0,
"CustomerList": [
{
"Devices": [
"string"
],
"CustomerId": "00000000-0000-0000-0000-000000000000",
"FirstName": "string",
"LastName": "string",
"Email": "string",
"UserId": "00000000-0000-0000-0000-000000000000",
"AccountNumber": "string",
"UserName": "string",
"Mobile": "string",
"DayTimeContact": "string",
"Location": "string",
"DateOfBirth": "string",
"DistributorId": "00000000-0000-0000-0000-000000000000",
"CurrencyId": "00000000-0000-0000-0000-000000000000",
"TimezoneId": 0,
"IsMetricsUnit": true,
"WorkContact": "string"
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<CarbonTrack.Data.CustomerModelPaging>
<RecordCount>0</RecordCount>
<CustomerList>
<Devices>string</Devices>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<FirstName>string</FirstName>
<LastName>string</LastName>
<Email>string</Email>
<UserId>00000000-0000-0000-0000-000000000000</UserId>
<AccountNumber>string</AccountNumber>
<UserName>string</UserName>
<Mobile>string</Mobile>
<DayTimeContact>string</DayTimeContact>
<Location>string</Location>
<DateOfBirth>string</DateOfBirth>
<DistributorId>00000000-0000-0000-0000-000000000000</DistributorId>
<CurrencyId>00000000-0000-0000-0000-000000000000</CurrencyId>
<TimezoneId>0</TimezoneId>
<IsMetricsUnit>true</IsMetricsUnit>
<WorkContact>string</WorkContact>
</CustomerList>
</CarbonTrack.Data.CustomerModelPaging>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | CarbonTrack.Data.CustomerModelPaging |
Response Schema
Status Code 200
| Name | Type | Description | Required |
|---|---|---|---|
| RecordCount | integer(int64) | Number of Customer Records | false |
| CustomerList | [CarbonTrack.Data.CustomerDevicesModel] | none | false |
CarbonTrack.Data.CustomerDevicesModel
| Name | Type | Description | Required |
|---|---|---|---|
| Devices | [string] | List of DeviceID | false |
| CustomerId | string(uuid) | Customer Id | false |
| FirstName | string | First name | false |
| LastName | string | Last name | false |
| string | Customer Email | false | |
| UserId | string(uuid) | User ID | false |
| AccountNumber | string | Customer User ID string | false |
| UserName | string | Customer's Login Name | false |
| Mobile | string | Customer's Mobile | false |
| DayTimeContact | string | Day time contact | false |
| Location | string | Customer's Address | false |
| DateOfBirth | string | Customer's Date of birth | false |
| DistributorId | string(uuid) | Customer's Distributor Id | false |
| CurrencyId | string(uuid) | Currency Id | false |
| TimezoneId | integer(int32) | Timezone Id | false |
| IsMetricsUnit | boolean | Is Metrics Unit | false |
| WorkContact | string | Work Contact | false |
Device
Device_DeviceInfo
Code samples
# You can also use wget
curl -X POST http://apiv2.carbontrack.com.au/ctapi/Device \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST http://apiv2.carbontrack.com.au/ctapi/Device HTTP/1.1
Host: apiv2.carbontrack.com.au
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: 'http://apiv2.carbontrack.com.au/ctapi/Device',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"DeviceID": "8796541235874587",
"CustomerReference": "ABC123",
"DistributorID": "00000000-0000-0000-0000-000000000000",
"RegisteredOnly": true,
"AdvanceKey": "string",
"PageIndex": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('http://apiv2.carbontrack.com.au/ctapi/Device',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'http://apiv2.carbontrack.com.au/ctapi/Device',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('http://apiv2.carbontrack.com.au/ctapi/Device', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://apiv2.carbontrack.com.au/ctapi/Device");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://apiv2.carbontrack.com.au/ctapi/Device", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://apiv2.carbontrack.com.au/ctapi/Device', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /ctapi/Device
Get device information
Body parameter
{
"DeviceID": "8796541235874587",
"CustomerReference": "ABC123",
"DistributorID": "00000000-0000-0000-0000-000000000000",
"RegisteredOnly": true,
"AdvanceKey": "string",
"PageIndex": 0
}
DeviceID: '8796541235874587'
CustomerReference: ABC123
DistributorID: 00000000-0000-0000-0000-000000000000
RegisteredOnly: true
AdvanceKey: string
PageIndex: 0
<?xml version="1.0" encoding="UTF-8" ?>
<CarbonTrack.Data.DeviceRequestModel>
<DeviceID>8796541235874587</DeviceID>
<CustomerReference>ABC123</CustomerReference>
<DistributorID>00000000-0000-0000-0000-000000000000</DistributorID>
<RegisteredOnly>true</RegisteredOnly>
<AdvanceKey>string</AdvanceKey>
<PageIndex>0</PageIndex>
</CarbonTrack.Data.DeviceRequestModel>
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| body | CarbonTrack.Data.DeviceRequestModel | Device request parameters | true |
CarbonTrack.Data.DeviceRequestModel
| Name | Type | Description | Required |
|---|---|---|---|
| DeviceID | string | Device ID Number | false |
| CustomerReference | string | Customer Reference | false |
| DistributorID | string(uuid) | Distributor ID | false |
| RegisteredOnly | boolean | Devices are active | false |
| AdvanceKey | string | GUID Special Key | false |
| PageIndex | integer(int32) | none | false |
Example responses
200 Response
{
"Devices": [
{
"DeviceID": "string",
"DeviceName": "string",
"CustomerRef": "string",
"IsRegistered": true,
"TimezoneId": 0,
"SensorConfig": "string",
"MeasurementConfig": "string",
"FirmwareVersion": "string",
"DeviceStatusUpdateDateTime": "string",
"DeviceDataUpdateDateTime": "string",
"IPAddress": "string",
"Longitude": 0,
"Latitude": 0,
"Distance": 0,
"IsDeviceContainsInverter": true,
"Weather": {
"WeatherLocation": "string",
"WeatherTemperature": "string",
"WeatherIcon": "string",
"DeviceName": "string",
"DeviceId": "string"
},
"Controls": [
{
"ControlId": 0,
"ControlType": "string",
"IsSwitchEnabled": true,
"Status": true
}
]
}
],
"Count": 0,
"Pages": 0,
"PagesIndex": 0,
"ResponseCode": 0,
"ResponseMessage": "string",
"Message": "string",
"Error": 0,
"ErrorNumber": 0,
"ErrorMessage": "string"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CarbonTrack.Data.DeviceResponsesModel>
<Devices>
<DeviceID>string</DeviceID>
<DeviceName>string</DeviceName>
<CustomerRef>string</CustomerRef>
<IsRegistered>true</IsRegistered>
<TimezoneId>0</TimezoneId>
<SensorConfig>string</SensorConfig>
<MeasurementConfig>string</MeasurementConfig>
<FirmwareVersion>string</FirmwareVersion>
<DeviceStatusUpdateDateTime>string</DeviceStatusUpdateDateTime>
<DeviceDataUpdateDateTime>string</DeviceDataUpdateDateTime>
<IPAddress>string</IPAddress>
<Longitude>0</Longitude>
<Latitude>0</Latitude>
<Distance>0</Distance>
<IsDeviceContainsInverter>true</IsDeviceContainsInverter>
<Weather>
<WeatherLocation>string</WeatherLocation>
<WeatherTemperature>string</WeatherTemperature>
<WeatherIcon>string</WeatherIcon>
<DeviceName>string</DeviceName>
<DeviceId>string</DeviceId>
</Weather>
<Controls>
<ControlId>0</ControlId>
<ControlType>string</ControlType>
<IsSwitchEnabled>true</IsSwitchEnabled>
<Status>true</Status>
</Controls>
</Devices>
<Count>0</Count>
<Pages>0</Pages>
<PagesIndex>0</PagesIndex>
<ResponseCode>0</ResponseCode>
<ResponseMessage>string</ResponseMessage>
<Message>string</Message>
<Error>0</Error>
<ErrorNumber>0</ErrorNumber>
<ErrorMessage>string</ErrorMessage>
</CarbonTrack.Data.DeviceResponsesModel>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | CarbonTrack.Data.DeviceResponsesModel |
Response Schema
Status Code 200
| Name | Type | Description | Required |
|---|---|---|---|
| Devices | [CarbonTrack.Data.DeviceResponseModel] | none | false |
| Count | integer(int32) | none | false |
| Pages | integer(int32) | none | false |
| PagesIndex | integer(int32) | none | false |
| ResponseCode | integer(int32) | none | false |
| ResponseMessage | string | none | false |
| Message | string | none | false |
| Error | integer(int32) | none | false |
| ErrorNumber | integer(int32) | none | false |
| ErrorMessage | string | none | false |
| Name | Type | Description | Required |
|---|---|---|---|
| DeviceID | string | none | false |
| DeviceName | string | none | false |
| CustomerRef | string | none | false |
| IsRegistered | boolean | none | false |
| TimezoneId | integer(int32) | none | false |
| SensorConfig | string | none | false |
| MeasurementConfig | string | none | false |
| FirmwareVersion | string | none | false |
| DeviceStatusUpdateDateTime | string | none | false |
| DeviceDataUpdateDateTime | string | none | false |
| IPAddress | string | none | false |
| Longitude | number(double) | none | false |
| Latitude | number(double) | none | false |
| Distance | number(double) | none | false |
| IsDeviceContainsInverter | boolean | none | false |
| Weather | CarbonTrack.Data.WeatherInformationModel | none | false |
| Controls | [CarbonTrack.Data.DeviceControlResponseModel] | none | false |
Distributor
Distributor_Get
Code samples
# You can also use wget
curl -X GET http://apiv2.carbontrack.com.au/ctapi/Distributor \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET http://apiv2.carbontrack.com.au/ctapi/Distributor HTTP/1.1
Host: apiv2.carbontrack.com.au
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: 'http://apiv2.carbontrack.com.au/ctapi/Distributor',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('http://apiv2.carbontrack.com.au/ctapi/Distributor',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get 'http://apiv2.carbontrack.com.au/ctapi/Distributor',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('http://apiv2.carbontrack.com.au/ctapi/Distributor', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://apiv2.carbontrack.com.au/ctapi/Distributor");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://apiv2.carbontrack.com.au/ctapi/Distributor", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://apiv2.carbontrack.com.au/ctapi/Distributor', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /ctapi/Distributor
Gets your Distributor ID
Example responses
200 Response
[
{
"ID": "00000000-0000-0000-0000-000000000000",
"UserName": "string"
}
]
<?xml version="1.0" encoding="UTF-8" ?>
<ID>00000000-0000-0000-0000-000000000000</ID>
<UserName>string</UserName>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Inline |
Measurement
Measurement_Post
Code samples
# You can also use wget
curl -X POST http://apiv2.carbontrack.com.au/ctapi/Measurement \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST http://apiv2.carbontrack.com.au/ctapi/Measurement HTTP/1.1
Host: apiv2.carbontrack.com.au
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: 'http://apiv2.carbontrack.com.au/ctapi/Measurement',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"ID": "00000000-0000-0000-0000-000000000000",
"DeviceID": "string",
"DistributorID": "00000000-0000-0000-0000-000000000000",
"FromUTCDate": "2019-05-16T06:59:35Z",
"ToUTCDate": "2019-05-16T06:59:35Z",
"PageIndex": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('http://apiv2.carbontrack.com.au/ctapi/Measurement',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'http://apiv2.carbontrack.com.au/ctapi/Measurement',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('http://apiv2.carbontrack.com.au/ctapi/Measurement', params={
}, headers = headers)
print r.json()
URL obj = new URL("http://apiv2.carbontrack.com.au/ctapi/Measurement");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://apiv2.carbontrack.com.au/ctapi/Measurement", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://apiv2.carbontrack.com.au/ctapi/Measurement', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /ctapi/Measurement
Get customer data - distributor level.
Body parameter
{
"ID": "00000000-0000-0000-0000-000000000000",
"DeviceID": "string",
"DistributorID": "00000000-0000-0000-0000-000000000000",
"FromUTCDate": "2019-05-16T06:59:35Z",
"ToUTCDate": "2019-05-16T06:59:35Z",
"PageIndex": 0
}
ID: 00000000-0000-0000-0000-000000000000
DeviceID: string
DistributorID: 00000000-0000-0000-0000-000000000000
FromUTCDate: '2019-05-16T06:59:35Z'
ToUTCDate: '2019-05-16T06:59:35Z'
PageIndex: 0
<?xml version="1.0" encoding="UTF-8" ?>
<CarbonTrack.Data.MeasurementRequestModel>
<ID>00000000-0000-0000-0000-000000000000</ID>
<DeviceID>string</DeviceID>
<DistributorID>00000000-0000-0000-0000-000000000000</DistributorID>
<FromUTCDate>2019-05-16T06:59:35Z</FromUTCDate>
<ToUTCDate>2019-05-16T06:59:35Z</ToUTCDate>
<PageIndex>0</PageIndex>
</CarbonTrack.Data.MeasurementRequestModel>
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| body | CarbonTrack.Data.MeasurementRequestModel | Request | true |
CarbonTrack.Data.MeasurementRequestModel
| Name | Type | Description | Required |
|---|---|---|---|
| ID | string(uuid) | Used for FileName | false |
| DeviceID | string | Device ID Number | false |
| DistributorID | string(uuid) | Distributor ID | false |
| FromUTCDate | string(date-time) | From UTC Date and Time | false |
| ToUTCDate | string(date-time) | To UTC Date and Time | false |
| PageIndex | integer(int32) | none | false |
Example responses
200 Response
{
"Measurements": [
{
"ID": "00000000-0000-0000-0000-000000000000",
"DeviceID": "string",
"RecordDateTime": "2019-05-16T06:59:35Z",
"PowerUsage": "0.00",
"Generating": "0.00",
"PowerExported": "0.00",
"PowerFactor1": "0.00",
"PowerFactor2": "0.00",
"PowerFactor3": "0.00",
"PowerFactor4": "0.00",
"Power1": "0.00",
"Power2": "0.00",
"Power3": "0.00",
"Power4": "0.00",
"Power1N": "0.00",
"Power2N": "0.00",
"Power3N": "0.00",
"Power4N": "0.00",
"PowerVAH1": "0.00",
"PowerVAH2": "0.00",
"PowerVAH3": "0.00",
"PowerVAH4": "0.00",
"Temperature1": "0.00",
"Temperature2": "0.00",
"Temperature3": "0.00",
"Temperature4": "0.00",
"Temperature5": "0.00",
"Temperature6": "0.00",
"Temperature7": "0.0",
"Temperature8": "0.00",
"Irradiation": "0.0",
"BatteryCharge": "0.00",
"Flow": "0.00",
"Voltage": "0.00",
"SignalStrength": "1,000.00",
"PowerUsageNet": "0.00",
"PowerExportedNet": "0.00"
}
],
"Count": 0,
"Pages": 0,
"PagesIndex": 0,
"ResponseCode": 0,
"ResponseMessage": "string",
"Message": "string",
"Error": 0,
"ErrorNumber": 0,
"ErrorMessage": "string"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CarbonTrack.Data.MeasurementResponsesModel>
<Measurements>
<ID>00000000-0000-0000-0000-000000000000</ID>
<DeviceID>string</DeviceID>
<RecordDateTime>2019-05-16T06:59:35Z</RecordDateTime>
<PowerUsage>0.00</PowerUsage>
<Generating>0.00</Generating>
<PowerExported>0.00</PowerExported>
<PowerFactor1>0.00</PowerFactor1>
<PowerFactor2>0.00</PowerFactor2>
<PowerFactor3>0.00</PowerFactor3>
<PowerFactor4>0.00</PowerFactor4>
<Power1>0.00</Power1>
<Power2>0.00</Power2>
<Power3>0.00</Power3>
<Power4>0.00</Power4>
<Power1N>0.00</Power1N>
<Power2N>0.00</Power2N>
<Power3N>0.00</Power3N>
<Power4N>0.00</Power4N>
<PowerVAH1>0.00</PowerVAH1>
<PowerVAH2>0.00</PowerVAH2>
<PowerVAH3>0.00</PowerVAH3>
<PowerVAH4>0.00</PowerVAH4>
<Temperature1>0.00</Temperature1>
<Temperature2>0.00</Temperature2>
<Temperature3>0.00</Temperature3>
<Temperature4>0.00</Temperature4>
<Temperature5>0.00</Temperature5>
<Temperature6>0.00</Temperature6>
<Temperature7>0.0</Temperature7>
<Temperature8>0.00</Temperature8>
<Irradiation>0.0</Irradiation>
<BatteryCharge>0.00</BatteryCharge>
<Flow>0.00</Flow>
<Voltage>0.00</Voltage>
<SignalStrength>1,000.00</SignalStrength>
<PowerUsageNet>0.00</PowerUsageNet>
<PowerExportedNet>0.00</PowerExportedNet>
</Measurements>
<Count>0</Count>
<Pages>0</Pages>
<PagesIndex>0</PagesIndex>
<ResponseCode>0</ResponseCode>
<ResponseMessage>string</ResponseMessage>
<Message>string</Message>
<Error>0</Error>
<ErrorNumber>0</ErrorNumber>
<ErrorMessage>string</ErrorMessage>
</CarbonTrack.Data.MeasurementResponsesModel>
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | CarbonTrack.Data.MeasurementResponsesModel |
Response Schema
Status Code 200
| Name | Type | Description | Required |
|---|---|---|---|
| Measurements | [CarbonTrack.Data.MeasurementResponseModel] | none | false |
| Count | integer(int32) | Record Count | false |
| Pages | integer(int32) | none | false |
| PagesIndex | integer(int32) | none | false |
| ResponseCode | integer(int32) | none | false |
| ResponseMessage | string | none | false |
| Message | string | none | false |
| Error | integer(int32) | none | false |
| ErrorNumber | integer(int32) | none | false |
| ErrorMessage | string | none | false |
| Name | Type | Description | Required |
|---|---|---|---|
| ID | string(uuid) | none | false |
| DeviceID | string | 16 Digit Number | false |
| RecordDateTime | string(date-time) | none | false |
| PowerUsage | string | Formated Number #.## | false |
| Generating | string | Formated Number #.## | false |
| PowerExported | string | Formated Number #.## | false |
| PowerFactor1 | string | Formated Number #.## | false |
| PowerFactor2 | string | Formated Number #.## | false |
| PowerFactor3 | string | Formated Number #.## | false |
| PowerFactor4 | string | Formated Number #.## | false |
| Power1 | string | Formated Number #.## | false |
| Power2 | string | Formated Number #.## | false |
| Power3 | string | Formated Number #.## | false |
| Power4 | string | Formated Number #.## | false |
| Power1N | string | Formated Number #.## | false |
| Power2N | string | Formated Number #.## | false |
| Power3N | string | Formated Number #.## | false |
| Power4N | string | Formated Number #.## | false |
| PowerVAH1 | string | Formated Number #.## | false |
| PowerVAH2 | string | Formated Number #.## | false |
| PowerVAH3 | string | Formated Number #.## | false |
| PowerVAH4 | string | Formated Number #.## | false |
| Temperature1 | string | Formated Number #.## | false |
| Temperature2 | string | Formated Number #.## | false |
| Temperature3 | string | Formated Number #.## | false |
| Temperature4 | string | Formated Number #.## | false |
| Temperature5 | string | Formated Number #.## | false |
| Temperature6 | string | Formated Number #.## | false |
| Temperature7 | string | Formated Number #.## | false |
| Temperature8 | string | Formated Number #.## | false |
| Irradiation | string | Formated Number #.## | false |
| BatteryCharge | string | Formated Number #.## | false |
| Flow | string | Formated Number #.## | false |
| Voltage | string | Formated Number #.## | false |
| SignalStrength | string | Formated Number #,###.## | false |
| PowerUsageNet | string | Formated Number #.## | false |
| PowerExportedNet | string | Formated Number #.## | false |
Schemas
carbonTRACKAPI.CustomerRequestModel
{
"CustomerRef": "string",
"Phone": "string",
"Address": "string",
"Page": 0,
"PageSize": 0
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| CustomerRef | string | Customer External Reference ID | none |
| Phone | string | Customer Phone | none |
| Address | string | Address location | none |
| Page | integer(int32) | Paging records page index | none |
| PageSize | integer(int32) | Number records returned per page | none |
CarbonTrack.Data.CustomerModelPaging
{
"RecordCount": 0,
"CustomerList": [
{
"Devices": [
"string"
],
"CustomerId": "00000000-0000-0000-0000-000000000000",
"FirstName": "string",
"LastName": "string",
"Email": "string",
"UserId": "00000000-0000-0000-0000-000000000000",
"AccountNumber": "string",
"UserName": "string",
"Mobile": "string",
"DayTimeContact": "string",
"Location": "string",
"DateOfBirth": "string",
"DistributorId": "00000000-0000-0000-0000-000000000000",
"CurrencyId": "00000000-0000-0000-0000-000000000000",
"TimezoneId": 0,
"IsMetricsUnit": true,
"WorkContact": "string"
}
]
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| RecordCount | integer(int64) | Number of Customer Records | none |
| CustomerList | [CarbonTrack.Data.CustomerDevicesModel] | undefined | none |
CarbonTrack.Data.CustomerDevicesModel
{
"Devices": [
"string"
],
"CustomerId": "00000000-0000-0000-0000-000000000000",
"FirstName": "string",
"LastName": "string",
"Email": "string",
"UserId": "00000000-0000-0000-0000-000000000000",
"AccountNumber": "string",
"UserName": "string",
"Mobile": "string",
"DayTimeContact": "string",
"Location": "string",
"DateOfBirth": "string",
"DistributorId": "00000000-0000-0000-0000-000000000000",
"CurrencyId": "00000000-0000-0000-0000-000000000000",
"TimezoneId": 0,
"IsMetricsUnit": true,
"WorkContact": "string"
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| Devices | [string] | List of DeviceID | none |
| CustomerId | string(uuid) | Customer Id | none |
| FirstName | string | First name | none |
| LastName | string | Last name | none |
| string | Customer Email | none | |
| UserId | string(uuid) | User ID | none |
| AccountNumber | string | Customer User ID string | none |
| UserName | string | Customer's Login Name | none |
| Mobile | string | Customer's Mobile | none |
| DayTimeContact | string | Day time contact | none |
| Location | string | Customer's Address | none |
| DateOfBirth | string | Customer's Date of birth | none |
| DistributorId | string(uuid) | Customer's Distributor Id | none |
| CurrencyId | string(uuid) | Currency Id | none |
| TimezoneId | integer(int32) | Timezone Id | none |
| IsMetricsUnit | boolean | Is Metrics Unit | none |
| WorkContact | string | Work Contact | none |
CarbonTrack.Data.DeviceRequestModel
{
"DeviceID": "8796541235874587",
"CustomerReference": "ABC123",
"DistributorID": "00000000-0000-0000-0000-000000000000",
"RegisteredOnly": true,
"AdvanceKey": "string",
"PageIndex": 0
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| DeviceID | string | Device ID Number | none |
| CustomerReference | string | Customer Reference | none |
| DistributorID | string(uuid) | Distributor ID | none |
| RegisteredOnly | boolean | Devices are active | none |
| AdvanceKey | string | GUID Special Key | none |
| PageIndex | integer(int32) | undefined | none |
CarbonTrack.Data.DeviceResponsesModel
{
"Devices": [
{
"DeviceID": "string",
"DeviceName": "string",
"CustomerRef": "string",
"IsRegistered": true,
"TimezoneId": 0,
"SensorConfig": "string",
"MeasurementConfig": "string",
"FirmwareVersion": "string",
"DeviceStatusUpdateDateTime": "string",
"DeviceDataUpdateDateTime": "string",
"IPAddress": "string",
"Longitude": 0,
"Latitude": 0,
"Distance": 0,
"IsDeviceContainsInverter": true,
"Weather": {
"WeatherLocation": "string",
"WeatherTemperature": "string",
"WeatherIcon": "string",
"DeviceName": "string",
"DeviceId": "string"
},
"Controls": [
{
"ControlId": 0,
"ControlType": "string",
"IsSwitchEnabled": true,
"Status": true
}
]
}
],
"Count": 0,
"Pages": 0,
"PagesIndex": 0,
"ResponseCode": 0,
"ResponseMessage": "string",
"Message": "string",
"Error": 0,
"ErrorNumber": 0,
"ErrorMessage": "string"
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| Devices | [CarbonTrack.Data.DeviceResponseModel] | undefined | none |
| Count | integer(int32) | undefined | none |
| Pages | integer(int32) | undefined | none |
| PagesIndex | integer(int32) | undefined | none |
| ResponseCode | integer(int32) | undefined | none |
| ResponseMessage | string | undefined | none |
| Message | string | undefined | none |
| Error | integer(int32) | undefined | none |
| ErrorNumber | integer(int32) | undefined | none |
| ErrorMessage | string | undefined | none |
CarbonTrack.Data.DeviceResponseModel
{
"DeviceID": "string",
"DeviceName": "string",
"CustomerRef": "string",
"IsRegistered": true,
"TimezoneId": 0,
"SensorConfig": "string",
"MeasurementConfig": "string",
"FirmwareVersion": "string",
"DeviceStatusUpdateDateTime": "string",
"DeviceDataUpdateDateTime": "string",
"IPAddress": "string",
"Longitude": 0,
"Latitude": 0,
"Distance": 0,
"IsDeviceContainsInverter": true,
"Weather": {
"WeatherLocation": "string",
"WeatherTemperature": "string",
"WeatherIcon": "string",
"DeviceName": "string",
"DeviceId": "string"
},
"Controls": [
{
"ControlId": 0,
"ControlType": "string",
"IsSwitchEnabled": true,
"Status": true
}
]
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| DeviceID | string | undefined | none |
| DeviceName | string | undefined | none |
| CustomerRef | string | undefined | none |
| IsRegistered | boolean | undefined | none |
| TimezoneId | integer(int32) | undefined | none |
| SensorConfig | string | undefined | none |
| MeasurementConfig | string | undefined | none |
| FirmwareVersion | string | undefined | none |
| DeviceStatusUpdateDateTime | string | undefined | none |
| DeviceDataUpdateDateTime | string | undefined | none |
| IPAddress | string | undefined | none |
| Longitude | number(double) | undefined | none |
| Latitude | number(double) | undefined | none |
| Distance | number(double) | undefined | none |
| IsDeviceContainsInverter | boolean | undefined | none |
| Weather | CarbonTrack.Data.WeatherInformationModel | undefined | none |
| Controls | [CarbonTrack.Data.DeviceControlResponseModel] | undefined | none |
CarbonTrack.Data.WeatherInformationModel
{
"WeatherLocation": "string",
"WeatherTemperature": "string",
"WeatherIcon": "string",
"DeviceName": "string",
"DeviceId": "string"
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| WeatherLocation | string | undefined | none |
| WeatherTemperature | string | undefined | none |
| WeatherIcon | string | undefined | none |
| DeviceName | string | undefined | none |
| DeviceId | string | undefined | none |
CarbonTrack.Data.DeviceControlResponseModel
{
"ControlId": 0,
"ControlType": "string",
"IsSwitchEnabled": true,
"Status": true
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| ControlId | integer(int32) | undefined | none |
| ControlType | string | undefined | none |
| IsSwitchEnabled | boolean | undefined | none |
| Status | boolean | undefined | none |
CarbonTrack.Data.DistributorModel
{
"ID": "00000000-0000-0000-0000-000000000000",
"UserName": "string"
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| ID | string(uuid) | undefined | none |
| UserName | string | undefined | none |
CarbonTrack.Data.MeasurementRequestModel
{
"ID": "00000000-0000-0000-0000-000000000000",
"DeviceID": "string",
"DistributorID": "00000000-0000-0000-0000-000000000000",
"FromUTCDate": "2019-05-16T06:59:35Z",
"ToUTCDate": "2019-05-16T06:59:35Z",
"PageIndex": 0
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| ID | string(uuid) | Used for FileName | none |
| DeviceID | string | Device ID Number | none |
| DistributorID | string(uuid) | Distributor ID | none |
| FromUTCDate | string(date-time) | From UTC Date and Time | none |
| ToUTCDate | string(date-time) | To UTC Date and Time | none |
| PageIndex | integer(int32) | undefined | none |
CarbonTrack.Data.MeasurementResponsesModel
{
"Measurements": [
{
"ID": "00000000-0000-0000-0000-000000000000",
"DeviceID": "string",
"RecordDateTime": "2019-05-16T06:59:35Z",
"PowerUsage": "0.00",
"Generating": "0.00",
"PowerExported": "0.00",
"PowerFactor1": "0.00",
"PowerFactor2": "0.00",
"PowerFactor3": "0.00",
"PowerFactor4": "0.00",
"Power1": "0.00",
"Power2": "0.00",
"Power3": "0.00",
"Power4": "0.00",
"Power1N": "0.00",
"Power2N": "0.00",
"Power3N": "0.00",
"Power4N": "0.00",
"PowerVAH1": "0.00",
"PowerVAH2": "0.00",
"PowerVAH3": "0.00",
"PowerVAH4": "0.00",
"Temperature1": "0.00",
"Temperature2": "0.00",
"Temperature3": "0.00",
"Temperature4": "0.00",
"Temperature5": "0.00",
"Temperature6": "0.00",
"Temperature7": "0.0",
"Temperature8": "0.00",
"Irradiation": "0.0",
"BatteryCharge": "0.00",
"Flow": "0.00",
"Voltage": "0.00",
"SignalStrength": "1,000.00",
"PowerUsageNet": "0.00",
"PowerExportedNet": "0.00"
}
],
"Count": 0,
"Pages": 0,
"PagesIndex": 0,
"ResponseCode": 0,
"ResponseMessage": "string",
"Message": "string",
"Error": 0,
"ErrorNumber": 0,
"ErrorMessage": "string"
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| Measurements | [CarbonTrack.Data.MeasurementResponseModel] | undefined | none |
| Count | integer(int32) | Record Count | none |
| Pages | integer(int32) | undefined | none |
| PagesIndex | integer(int32) | undefined | none |
| ResponseCode | integer(int32) | undefined | none |
| ResponseMessage | string | undefined | none |
| Message | string | undefined | none |
| Error | integer(int32) | undefined | none |
| ErrorNumber | integer(int32) | undefined | none |
| ErrorMessage | string | undefined | none |
CarbonTrack.Data.MeasurementResponseModel
{
"ID": "00000000-0000-0000-0000-000000000000",
"DeviceID": "string",
"RecordDateTime": "2019-05-16T06:59:35Z",
"PowerUsage": "0.00",
"Generating": "0.00",
"PowerExported": "0.00",
"PowerFactor1": "0.00",
"PowerFactor2": "0.00",
"PowerFactor3": "0.00",
"PowerFactor4": "0.00",
"Power1": "0.00",
"Power2": "0.00",
"Power3": "0.00",
"Power4": "0.00",
"Power1N": "0.00",
"Power2N": "0.00",
"Power3N": "0.00",
"Power4N": "0.00",
"PowerVAH1": "0.00",
"PowerVAH2": "0.00",
"PowerVAH3": "0.00",
"PowerVAH4": "0.00",
"Temperature1": "0.00",
"Temperature2": "0.00",
"Temperature3": "0.00",
"Temperature4": "0.00",
"Temperature5": "0.00",
"Temperature6": "0.00",
"Temperature7": "0.0",
"Temperature8": "0.00",
"Irradiation": "0.0",
"BatteryCharge": "0.00",
"Flow": "0.00",
"Voltage": "0.00",
"SignalStrength": "1,000.00",
"PowerUsageNet": "0.00",
"PowerExportedNet": "0.00"
}
Properties
| Name | Type | Description | Required |
|---|---|---|---|
| ID | string(uuid) | undefined | none |
| DeviceID | string | 16 Digit Number | none |
| RecordDateTime | string(date-time) | undefined | none |
| PowerUsage | string | Formated Number #.## | none |
| Generating | string | Formated Number #.## | none |
| PowerExported | string | Formated Number #.## | none |
| PowerFactor1 | string | Formated Number #.## | none |
| PowerFactor2 | string | Formated Number #.## | none |
| PowerFactor3 | string | Formated Number #.## | none |
| PowerFactor4 | string | Formated Number #.## | none |
| Power1 | string | Formated Number #.## | none |
| Power2 | string | Formated Number #.## | none |
| Power3 | string | Formated Number #.## | none |
| Power4 | string | Formated Number #.## | none |
| Power1N | string | Formated Number #.## | none |
| Power2N | string | Formated Number #.## | none |
| Power3N | string | Formated Number #.## | none |
| Power4N | string | Formated Number #.## | none |
| PowerVAH1 | string | Formated Number #.## | none |
| PowerVAH2 | string | Formated Number #.## | none |
| PowerVAH3 | string | Formated Number #.## | none |
| PowerVAH4 | string | Formated Number #.## | none |
| Temperature1 | string | Formated Number #.## | none |
| Temperature2 | string | Formated Number #.## | none |
| Temperature3 | string | Formated Number #.## | none |
| Temperature4 | string | Formated Number #.## | none |
| Temperature5 | string | Formated Number #.## | none |
| Temperature6 | string | Formated Number #.## | none |
| Temperature7 | string | Formated Number #.## | none |
| Temperature8 | string | Formated Number #.## | none |
| Irradiation | string | Formated Number #.## | none |
| BatteryCharge | string | Formated Number #.## | none |
| Flow | string | Formated Number #.## | none |
| Voltage | string | Formated Number #.## | none |
| SignalStrength | string | Formated Number #,###.## | none |
| PowerUsageNet | string | Formated Number #.## | none |
| PowerExportedNet | string | Formated Number #.## | none |