Get Reports Summary
Note
This API is used for getting the daily reports reported by the user.
Action | Parameters | Description |
---|---|---|
get |
from_date,to_date,team_id,user_email |
Get the reported daily reports. |
Endpoint
GET
/api/v2/dailyreport/check_reports/?from_date=2022-12-01&to_date=2022-12-05&team_id={team_id}&user_email={user_email}
If user_email
is specified, the information of specified user will be returned.
If it's not, current user information will be returned.
Example Request
var axios = require('axios');
var config = {
method: 'get',
url: 'https://app.engineerforce.io/api/v2/dailyreport/check_reports/?from_date=2022-12-01&to_date=2022-12-05&team_id=100',
headers: { 'Authorization': 'API-Token {{YOUR_API_TOKEN}}' }
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url('https://app.engineerforce.io/api/v2/dailyreport/check_reports/?from_date=2022-12-01&to_date=2022-12-05&team_id=100')
.method("GET", body)
.addHeader("Authorization", "API-Token {{YOUR_API_TOKEN}}")
.build();
Response response = client.newCall(request).execute();
import requests
url = 'https://app.engineerforce.io/api/v2/dailyreport/check_reports/?from_date=2022-12-01&to_date=2022-12-05&team_id=100'
payload={}
headers = {'Authorization': 'API-Token {{YOUR_API_TOKEN}}' }
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Example Response
[
{
"date": "2022-12-01",
"day": "Thursday",
"submitted": true,
"from": null,
"to": null,
"total": "6.0H"
},
{
"date": "2022-12-02",
"day": "Friday",
"submitted": true,
"from": null,
"to": null,
"total": "4.0H"
},
{
"date": "2022-12-03",
"day": "Saturday",
"submitted": false,
"from": null,
"to": null,
"total": "0H"
},
{
"date": "2022-12-04",
"day": "Sunday",
"submitted": false,
"from": null,
"to": null,
"total": "0H"
},
{
"date": "2022-12-05",
"day": "Monday",
"submitted": true,
"from": null,
"to": null,
"total": "5.0H"
},
{
"extraInfo": {
"totalOperatingHours": 15.0,
"user": "zaw@engineerforce.io",
"fromDate": "2022-12-01",
"toDate": "2022-12-05"
}
}
]
Note
The last object of the above response object will always be
extraInfo
and it will be useful for getting related information such as the total reported working hours (or) specifying which user's information is being returned.