TMY integration environment details
Description
A customer’s application can automatize sending requests to TMY APIs from their applications. In order to provide a better user experience, and mitigate the risk of using paid calls, Solargis published an integration environment. By using this environment customer is allowed:
to perform initial tests
automatize the data request process without the necessity of using paid subscriptions
prepare the implementation for all possible states that TMY APIs can return
Configuration
In order to use this environment, a Solargis admin needs to register the correct subscription and generate tokens for communication. For purpose of using an integration environment two subscriptions were introduced:
TMY_API_BASIC_INTEGRATION
TMY_API_PRO_INTEGRATION
Both of these subscriptions support a combination of parameters (both input and output) as “real-prod” subscriptions. The only difference is that requests must be always sent to the predefined location (long, lat) and defined parameters' values, see the “Request details” sections.
In order to distinguish between generation or “real” data requests and “test” data request different URL are being used:
Data request: https://api.solargis.com/tmy-integration/data-request
Request status: https://api.solargis.com/tmy-integration/data-request/{requestId}
After sending a data generation request, a requestor can check the data generation status by sending status requests. For the status request message system returns a response message according to the following logic (queued - processing - done).
status request < 5 seconds from data request → status = queued
status request >= 5 seconds <= 10 seconds from data request → status = processing
status request > 10 seconds from data request → status =done
Request definition
The integration environment exposes APIs with 3 endpoints which provide identical services as APIs used with “real-prod” subscription:
TMY data generation endpoint
TMY data generation request status retrieving endpoint
User and subscription details retrieving endpoint
Please note that integration environment request body cannot be modified and must be used exactly as defined below.
With a BASIC token, only a BASIC request can be made.
With a PRO token, only PRO requests can be made.
Requests details
TMY_API_BASIC_INTEGRATION request (PT60M)
{
"latitude": 48.61259,
"longitude": 20.827079,
"timeStep": "PT60M",
"tmyScenario": "P50",
"outputFormats": ["SOLARGIS_CSV","SOLARGIS_JSON", "SAM", "HELIOSCOPE"],
"siteName": "Basic example Site",
"fileLabel": "basic_01"
}
TMY_API_PRO_INTEGRATION request (PT60M)
{
"latitude": 48.61259,
"longitude": 20.827079,
"timeStep": "PT60M",
"tmyScenario": "P50",
"outputFormats": ["SOLARGIS_CSV","SOLARGIS_JSON", "SAM", "HELIOSCOPE"],
"siteName": "Pro example Site",
"fileLabel": "pro_01"
}
TMY_API_PRO_INTEGRATION request (PT15M)
{
"latitude": 48.61259,
"longitude": 20.827079,
"timeStep": "PT15M",
"tmyScenario": "P50",
"outputFormats": ["SOLARGIS_CSV","SOLARGIS_JSON", "SAM"],
"siteName": "Pro example Site",
"fileLabel": "pro_02"
}