Skip to main content

WeatherStack Core Internal API 1.x.x

note

The majority of the API routes found on this page are designed to be used within C or C++ programs, so they may not return data that can be easily interpreted by languages such as JavaScript.

The API routes on this page do not follow the default API guidelines as they are internal API routes. This means that by default, these API routes are insecure, and should not be publicly exposed.

For more information on how to secure this internal endpoint for public exposure, please follow this guide.

danger

Exposing this endpoint without securing it is dangerous, and leaves a security vulnerability.


GET /

Description:
This API route is simply to return a small JSON object, telling you some basic information as to what is running on that port.
Accepts:
(0)

Possible responses:

200

Headers:

HeaderValue
Content-Typeapplication/json

Data type:
JSON (application/json)

{
"success": true,
"code": 200,

"message": "Number 5 is alive!",

"version": "1.0.0", // Current version
"name": "WeatherStack Core Internal API", // Name (Makes it easier to look it up)
"repository": "https://github.com/WeatherStack/Core" // Repository link
}

GET /v1/health/liveliness

Description:
Only returns status 200 if everything is good, and working correctly and as expected.
Accepts:
(0)

Possible responses:

200

No content.


GET /v1/health/info

Description:
This API route gives more in-depth information, such as uptime.
Accepts:
(0)

Possible responses:

200
{
"success": true,
"code": 200,

"message": "Dude, you can't run from the future!",

"stats": {
"uptime": 3538688.83811651,
"uptime_human": "1 months 10 days 12 hours 24 minutes 32 seconds 838 milliseconds"
}
}