APIs useful for Daily Report functions
GET RELATED PROJECTS
Note
This API is used for getting the related projects which are available for daily reporting. (basically approved projects which have tasks assigned to the current requesting user).
Action | Parameters | Description |
---|---|---|
get |
None |
Get the related projects for daily report. |
Endpoint
Example Request
var axios = require('axios');
var config = {
method: 'get',
url: 'https://app.engineerforce.io/api/v2/dailyreport/get_related_projects',
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/get_related_projects')
.method("GET", body)
.addHeader("Authorization", "API-Token {{YOUR_API_TOKEN}}")
.build();
Response response = client.newCall(request).execute();
Example Response
CHECKING IF DAILYREPORT EXISTS
Note
This API is used for checking if a daily report on a given date exists.
Action | Parameters | Description |
---|---|---|
get |
date |
Check if daily report is done on a given date. |
Endpoint
Example Request
var axios = require('axios');
var config = {
method: 'get',
url: 'https://app.engineerforce.io/api/v2/dailyreport/report_exists/?date=2022-12-01',
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/report_exists/?date=2022-12-01')
.method("GET", body)
.addHeader("Authorization", "API-Token {{YOUR_API_TOKEN}}")
.build();
Response response = client.newCall(request).execute();