Table of Contents | ||||
---|---|---|---|---|
|
TMY API definition
The system currently exposes 3 different endpoints that support TMY data generation and retrieving. Each TMY API call expects a different data structure as defined below.
...
Response: result for the case of successful processing is:
Subscription details
...
TMY data generation request
Request method: POST
URL: https://api.solargis.com/tmy/data-request
Request message
Header:
Key | Value |
---|---|
authorization | Bearer {token generated by Company admin via UI} |
...
Code Block |
---|
{ "latitude": 42.91, "longitude": -114.84, "timeStep": "PT60M", "tmyScenario": "P50", "outputFormats": ["SOLARGIS_CSV","SOLARGIS_JSON", "SAM", "HELIOSCOPE"], "siteName": "Pro example Site", "fileLabel": "pro_01" } |
Response message
HTTP: 200 OK
Field name | Type | Mandatory | Length | Description |
---|---|---|---|---|
requestId | string - random ID | Yes | max 36 | Request identifier |
...
Code Block |
---|
{ "requestId": "5qmuSlqinM" } |
...
TMY data generation request status
Request method: GET
URL: https://api.solargis.com/tmy/data-request/{requestId}
Request message
Header:
Key | Value |
---|---|
authorization | Bearer {token generated by Company admin via UI} |
...
GET: https://api.solargis.com/tmy/data-request/5qmuSlqinM
Response message
HTTP: 200 OK
Field name | Type | Mandatory | Description |
---|---|---|---|
status | Text | Yes | Enum: queued, processing, success, reject, error, expired |
statusCode | Text | No |
|
statusMessage | Text | No |
|
downloadUrl | Text | No | Is provided only once the processing of the data request was successful. Status = Success |
...
Code Block |
---|
HTTP 200 { "status": "error", "statusCode": "400", "statusMessage": "Out of data coverage." } |
...
Generated output TMY data in message response
Request method: GET
URL: https://api.solargis.com/tmy/data-request/{requestId}/{output format}
...
SOLARGIS_JSON
SOLARGIS_CSV
SAM
HELIOSCOPE
Request message
Header:
Key | Value |
---|---|
authorization | Bearer {token generated by Company admin via UI} |
...
GET: https://api.solargis.com/tmy/data-request/5qmuSlqinM/SOLARGIS_JSON
Response message
HTTP: 200 OK
Code Block |
---|
{ output data in json/csv format } |
...
Subscription (Company + User) details request
Request method: GET
URL: https://api.solargis.com/customer/company-subscription/status
Request message
Header:
Key | Value |
---|---|
authorization | Bearer {token generated by Company admin via UI} |
...
GET: https://api.solargis.com/customer/company-subscription/status
Response message
HTTP: 200 OK
Field name | Type | Mandatory | Description |
---|---|---|---|
user | Object | No | User object for case of user token is being used |
| Text | No | First name |
| Text | No | Middle name |
| Text | No | Last name |
| Text | No | Email address |
company | Object | Yes | Company object |
| Text | Yes | Company ID |
| Text | No | Company name |
subscriptions | Array of Objects | Yes | List of all subscriptions assigned to user (in case of user token is being used / for Userless token only one subscription is returned |
| Text | Yes | Subscription identifier |
| Datetime | Yes | Time of validity: From |
| Datetime | Yes | Time of validity: To |
| Text | Yes | Subscription type |
| Text | Yes | Subscription can be consumed = true, else false |
| Number | Yes | Amount of all requests that can be called on the subscription |
| Number | Yes | Amount of all requests that are being processed |
| Number | Yes | Amount of all successful requests |
| Text | No | Subscription custom name |
...