Specification

Environments

We understand that the development and testing process is a critical part of building and integrating with our smart energy management platform.

To facilitate this, we offer two distinct environments: sandbox and production. These environments serve specific purposes, each designed to help you build, test, integrate faster and more effectively with the HanChuESS Connect.

Sandbox

idaas-sandbox.hanchuess.com

Ideal playground for developers and partners who want to experiment with theHanChuESS Connect without touching real user data.

Production

idaas.hanchuess.com

The real deal. In this environment, you have access to actual data from customers assets. It is the place to go when you are ready to launch your application

EndPoints

Authenticate

https://{DOMAIN}/portal/{METHOD}

OpenAPI

https://{DOMAIN}/api/{METHOD}

circle-exclamation

Protocol

Https supported only, Use OAuth2.0 authentication mechanism.

Restriction

  • The open API is designed in RESTful style.

  • Request data format supports UTF-8, JSON format to return.

  • Authenticate allow partner obtain token before invoke, modes supported in the following:

    • authorization_code

    • client_credentials

About our limits

Limits are designed to prevent API abuse, while minimizing impact on common customer usage patterns.

You may hit rate limits over shorter time intervals. For instance, a rate of 60 requests per minute (RPM) may be enforced as 1 request per second. Short bursts of requests at a high volume can surpass the rate limit and result in rate limiterrors.

We use the token bucket algorithm to do rate limiting. This means that your capacity is continuously replenished up to your maximum limit, rather than beingreset at fixed intervals.

circle-exclamation

Request Header

Name
Necessary
Description

Content-Type

Y

Request type.

Authorization

Y

User Access token.

Accept-Language

N

I18N support, default en-US, optional zh-CN.

X-Signature

Y

Use HMAC256 to signature.

X-Timestamp

Y

Current timestamp in milliseconds.

X-Nonce

Y

Used once, random characters by UUIDv4.

X-Api-Version

N

Specified api version if needed.

Response Header

Name
Description

X-Request-Id

Troubleshooting when needed.

X-RateLimit-Remaining

Remaining tokens in bucket.

X-RateLimit-Replenish-Rate

Replenish token per request.

X-RateLimit-Burst-Capacity

Token bucket burst capacity.

X-RateLimit-Requested-Tokens

Token consumption in request.

Return Format

Parameter
Data Type
Decription

errno

string

See Errors for more details.

msg

string

Prompt or error message.

data

object

Response data in json format.

Signature

Restriction

Partners ought to generate different nonce per request, and server could tolerate max time within 60 seconds, otherwise, illegal request would receive 403 response from HanchuESS Connect.

Rule

Format

{HTTP_METHOD}:{API_METHOD}:{TIMESTAMP}:{NONCE}

circle-check

Code Example

Last updated