Job Reporting
HEAppE provides the Job Reporting API endpoints for retrieving the accounting values of the jobs. The accounting values are computed by the accounting formula defined in the seed file. The accounting values are stored in the database and can be retrieved by calling the JobReporting
REST API endpoints.
ListAdaptorUserGroups Reporting
Needed role: GroupReporter
The following example shows how to retrieve the accounting values for projects under groups which the user is a member of by calling the REST API endpoint heappe/JobReporting/ListAdaptorUserGroups
.
Field |
Type |
Description |
Example Values |
---|---|---|---|
sessionCode |
string |
The session code returned by the |
9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1 |
Example Request
$ curl -X 'GET'
'http://localhost:5000/heappe/JobReporting/ListAdaptorUserGroups?sessionCode=<sessionCode>'
-H 'accept: application/json'
Example Response
[
{
"Id": 1,
"Name": "Group 1",
"Description": "HEAppE Development group",
"TotalUsage": 159.88,
"UsageType": 2,
"Project": {
"Id": 1,
"Name": "Development",
"Description": "Development project",
"AccountingString": "DD-00-98",
"TotalUsage": 159.88
}
}
]
Note
- The
UsageType
attribute can have the following values: 1
=NodeHours
2
=CoreHours
UserResourceUsageReport
Needed role: GroupReporter
The following example shows how to retrieve the accounting values for user by calling the REST API endpoint heappe/JobReporting/UserResourceUsageReport
.
Field |
Type |
Description |
Example Values |
---|---|---|---|
userId |
integer |
The user identifier. |
1 |
startTime |
string |
The start time of the period. |
2024-09-13T11:06:57.172Z |
endTime |
string |
The end time of the period. |
2025-09-13T11:06:57.172Z |
subProjects |
string |
The subprojects. |
test |
sessionCode |
string |
The session code returned by the |
9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1 |
Example Request
$ curl -X 'GET'
'http://localhost:5000/heappe/JobReporting/UserResourceUsageReport?userId=1&startTime=2024-09-13T11%3A06%3A57.172Z&endTime=2025-09-13T11%3A06%3A57.172Z&subProjects=test&sessionCode=<sessionCode>' \
-H 'accept: application/json'
Example Response
[
{
"Id": 1,
"Name": "Development",
"AccountingString": "DD-00-98",
"TotalUsage": 0,
"UsageType": 2,
"Clusters": [
{
"Id": 1,
"Name": "Karolina",
"TotalUsage": 0,
"ClusterNodeTypes": [
{
"Id": 1,
"Name": "qcpu",
"TotalUsage": 0,
"Jobs": []
}
]
}
]
}
]
Note
- The
UsageType
attribute can have the following values: 1
=NodeHours
2
=CoreHours
UserGroupResourceUsageReport
Needed role: Reporter
The following example shows how to retrieve the accounting values for the group by calling the REST API endpoint heappe/JobReporting/UserGroupResourceUsageReport
.
Field |
Type |
Description |
Example Values |
---|---|---|---|
groupId |
integer |
The group identifier. |
1 |
startTime |
string |
The start time of the period. |
2024-09-13T11:06:57.172Z |
endTime |
string |
The end time of the period. |
2025-09-13T11:06:57.172Z |
subProjects |
string |
The subprojects. |
test |
sessionCode |
string |
The session code returned by the |
9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1 |
Example Request
$ curl -X 'GET'
'http://localhost:5000/heappe/JobReporting/UserGroupResourceUsageReport?groupId=1&startTime=2024-09-13T11%3A06%3A57.172Z&endTime=2025-09-13T11%3A06%3A57.172Z&subProjects=test&sessionCode=<sessionCode>' \
-H 'accept: application/json'
Example Response
[
{
"Id": 1,
"Name": "Development",
"AccountingString": "DD-00-98",
"TotalUsage": 0,
"UsageType": 2,
"Clusters": [
{
"Id": 1,
"Name": "Karolina",
"TotalUsage": 0,
"ClusterNodeTypes": [
{
"Id": 1,
"Name": "qcpu",
"TotalUsage": 0,
"Jobs": []
}
]
}
]
}
]
Note
- The
UsageType
attribute can have the following values: 1
=NodeHours
2
=CoreHours
AggregatedUserGroupResourceUsageReport
Needed role: Reporter
AggregatedUserGroupResourceUsage Report can be used to retrieve the accounting values aggregated to the SubProjects
and Clusters
by calling the REST API endpoint heappe/JobReporting/AggregatedUserGroupResourceUsageReport
.
Field |
Type |
Description |
Example Values |
---|---|---|---|
startTime |
string |
The start time of the period. |
2024-09-13T11:06:57.172Z |
endTime |
string |
The end time of the period. |
2025-09-13T11:06:57.172Z |
sessionCode |
string |
The session code returned by the |
9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1 |
Example Request
$ curl -X 'GET'
'http://localhost:5000/heappe/JobReporting/AggregatedUserGroupResourceUsageReport?startTime=2024-09-13T11%3A06%3A57.172Z&endTime=2025-09-13T11%3A06%3A57.172Z&sessionCode=9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1'
-H 'accept: application/json'
Example Response
[
{
"Id": 1,
"Name": "Development",
"AccountingString": "DD-00-98",
"TotalUsage": 0,
"UsageType": 2,
"SubProjects": [],
"Clusters": [
{
"Id": 1,
"Name": "Karolina",
"TotalUsage": 0,
"ClusterNodeTypesAggregations": [
{
"Id": 1,
"Name": "KAROLINA_CPU",
"TotalUsage": 0,
"ClusterNodeTypes": [
{
"Id": 1,
"Name": "qcpu",
"TotalUsage": 0,
"Jobs": []
},
{
"Id": 2,
"Name": "qcpu_biz",
"TotalUsage": 0,
"Jobs": []
}
]
}
]
}
]
}
]
Note
- The
UsageType
attribute can have the following values: 1
=NodeHours
2
=CoreHours
ResourceUsageReportForJob
Needed role: Reporter
The following example shows how to retrieve the accounting values for the specific job by calling the REST API endpoint heappe/JobReporting/ResourceUsageReportForJob
.
Field |
Type |
Description |
Example Values |
---|---|---|---|
jobId |
integer |
The job identifier. |
1 |
sessionCode |
string |
The session code returned by the |
9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1 |
Example Request
$ curl -X 'GET'
'http://localhost:5000/heappe/JobReporting/ResourceUsageReportForJob?jobId=1&sessionCode=9f06bb03-9228-47d9-9dd4-e4b37f2c9ba1'
-H 'accept: application/json'
Example Response
{
"Id": 1,
"Name": "Development",
"Description": "Development project",
"AccountingString": "DD-00-98",
"TotalUsage": 0,
"Clusters": [
{
"Id": 1,
"Name": "Karolina",
"Description": "IT4Innovations Karolina cluster",
"TotalUsage": 0,
"ClusterNodeTypes": [
{
"Id": 3,
"TotalUsage": 0,
"Name": "qcpu_exp",
"Description": "qcpu_exp 16 nodes",
"Jobs": [
{
"Id": 1,
"Name": "TEST",
"State": 1,
"Tasks": [
{
"Id": 1,
"Name": "TEST",
"State": 1,
"StartTime": null,
"EndTime": null,
"CommandTemplateId": 1,
"Usage": 0
}
]
}
]
}
]
}
]
}