- Dev notes
- soil-pest-resource-controller
- volunteer-controller
- volunteer-activity-controller
- resource-exchange-controller
- plot-controller
- local-partner-controller
- knowledge-resource-controller
- crop-plan-controller
- community-garden-controller
- user-controller
- role-controller
- weather-controller
- auth-controller
Save weather data
POST
/api/user/save-weather
weather-controller
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Query Params
lat
number <double>
required
lon
number <double>
required
gardenId
integer <int64>
required
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/user/save-weather?lat&lon&gardenId'
Responses
🟢200Weather data saved successfully
application/json
Body
id
integer <int64>
optional
latitude
number <double>
optional
longitude
number <double>
optional
cityName
string
optional
country
string
optional
temperature
number <double>
optional
feelsLike
number <double>
optional
tempMin
number <double>
optional
tempMax
number <double>
optional
pressure
integer <int32>
optional
humidity
integer <int32>
optional
windSpeed
number <double>
optional
windDegree
integer <int32>
optional
cloudiness
integer <int32>
optional
date
string <date-time>
optional
sunrise
string <date-time>
optional
sunset
string <date-time>
optional
communityGarden
object (CommunityGarden)
optional
id
integer <int64>
optional
name
string
optional
location
string
optional
sunlight
string
optional
soilType
string
optional
users
array[object (UserEntity) {7}]
optional
plots
array[object (Plot) {5}]
optional
Example
{
"id": 0,
"latitude": 0,
"longitude": 0,
"cityName": "string",
"country": "string",
"temperature": 0,
"feelsLike": 0,
"tempMin": 0,
"tempMax": 0,
"pressure": 0,
"humidity": 0,
"windSpeed": 0,
"windDegree": 0,
"cloudiness": 0,
"date": "2019-08-24T14:15:22Z",
"sunrise": "2019-08-24T14:15:22Z",
"sunset": "2019-08-24T14:15:22Z",
"communityGarden": {
"id": 0,
"name": "string",
"location": "string",
"sunlight": "string",
"soilType": "string",
"users": [
{
"id": 0,
"username": "string",
"email": "string",
"password": "string",
"roleEntities": [
{
"id": 0,
"name": "string",
"users": [
{}
]
}
],
"communityGardens": [
{}
],
"volunteerActivity": {
"id": 0,
"activityName": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"users": [
{}
],
"volunteers": [
{
"id": 0,
"name": "string",
"contactInfo": "string",
"skills": "string",
"availability": "string",
"activities": [
{}
]
}
]
}
}
],
"plots": [
{
"id": 0,
"plotName": "string",
"sunlight": "string",
"soilType": "string",
"communityGarden": {}
}
]
}
}
🟠400Invalid input parameters
🟠404Community garden not found
🔴500Internal server error
Modified at 2024-06-11 16:24:49