Description:
Gets all user groups of the company.
Signature:
public HttpResponseMessage GetAllUserGroups(Guid companyAuthCode, bool includeDeleted = false)
Return values:
OK (StatusCode = 200 - OK), AuthCode is not valid (StatusCode = 401 - Unauthorized), Unknown error (StatusCode = 500 - InternalServerError),
In case of "OK", the function returns a list of WorkerGroup_v2 objects in JSON.
Arguments:
| Type |
Name |
Direction |
Description |
| Guid |
CompanyAuthCode |
In |
A globally unique identifier (GUID) which authenticates the company. |
| bool |
includeDeleted |
In |
Optional. Defines whether deleted groups should be retrieved or not. Default is false. |
Example code:
// HttpGet // Get every non-deleted user group https://WEBSITEURL/api/restapi/GetAllUserGroups?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB
// Get every user group (including deleted ones) https://WEBSITEURL/api/restapi/GetAllUserGroups?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB&includeDeleted=true
Description:
Gets all users of the company.
Signature:
public HttpResponseMessage GetAllUsers(Guid companyAuthCode, bool includeDeleted = false)
Return values:
OK (StatusCode = 200 - OK), AuthCode is not valid (StatusCode = 401 - Unauthorized), Unknown error (StatusCode = 500 - InternalServerError),
In case of "OK", the function returns a list of Worker_v2 objects in JSON.
Arguments:
| Type |
Name |
Direction |
Description |
| Guid |
CompanyAuthCode |
In |
A globally unique identifier (GUID) which authenticates the company. |
| bool |
includeDeleted |
In |
Optional. Defines whether deleted users should be retrieved or not. Default is false. |
Example code:
// HttpGet // Get every non-deleted user (active or suspended) https://WEBSITEURL/api/restapi/GetAllUsers?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB
// Get every user (including deleted ones) https://WEBSITEURL/api/restapi/GetAllUsers?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB&includeDeleted=true
Description:
Gets a custom favorite report from the website.
Signature:
public HttpResponseMessage GetBSONFavoriteReport(FavoriteReportParameter favoriteReportParameter)
Return values:
OK (StatusCode = 200 - OK), AuthCode is not valid or parameter is null (StatusCode = 401 - Unauthorized), Unknown error (StatusCode = 500 - InternalServerError),
In case of "OK", the function returns a ByteArrayContent object
Arguments:
| Type |
Name |
Direction |
Description |
| FavoriteReportParameter |
favoriteReportParameter |
In |
A favorite report parameter |
Example code:
Description:
Gets a custom report from the website.
Signature:
public HttpResponseMessage GetBSONReport(CustomReportParameter customReportParameter)
Return values:
OK (StatusCode = 200 - OK), AuthCode is not valid (StatusCode = 401 - Unauthorized), Unknown error (StatusCode = 500 - InternalServerError),
In case of "OK", the function returns a ByteArrayContent object
Arguments:
| Type |
Name |
Direction |
Description |
| CustomReportParameter |
CustomReportParameter |
In |
A custom report parameter |
Example code:
Description:
Gets a custom report from the website. You have to pass all of the query parameters, including the custom report's definition Id. This function does not support "tiled" reports which have report-specific parameters as well.
Signature:
public HttpResponseMessage GetCustomReport(Guid companyAuthCode, DateTime utcStartDate, DateTime utcEndDate, int definitionId, int minimalTimeForIdleStatusInSec, int[] userIds, int[] workerGroupIds)
Return values:
OK (StatusCode = 200 - OK), AuthCode is not valid (StatusCode = 401 - Unauthorized), Unknown error (StatusCode = 500 - InternalServerError),
In case of "OK", the function returns a DataCollector object in JSON. (check "Classes" section for more details)
Arguments:
| Type |
Name |
Direction |
Description |
| Guid |
CompanyAuthCode |
In |
A globally unique identifier (GUID) which authenticates the company. |
| DateTime |
utcStartDate |
In |
Start date of the report |
| DateTime |
utcEndDate |
In |
End date of the report |
| int |
DefinitionId |
In |
The id of the custom report definition. You can see this Id on the website in the table on the "Custom report definitions" page. |
| int |
minimalTimeForIdleStatusInSec |
In |
Value for determining the idle time in the reports, only times over the given value will be considered as idle time |
| int[] |
userIds |
In |
Array of user ids, that should be included in the report, if set to null, all users are included |
| int[] |
workerGroupIds |
In |
Array of workgroup ids, that should be included in the report, if set to null, all workgroups are included |
Example code:
// HttpGet // Get the report for the whole company https://WEBSITEURL/api/restapi/getcustomreport?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB&utcStartDate=2021-01-18T00:00&utcEndDate=2021-01-19T00:00&definitionId=1234&minimalTimeForIdleStatusInSec=120
// Get the report for a single user only https://WEBSITEURL/api/restapi/getcustomreport?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB&utcStartDate=2021-01-18T00:00&utcEndDate=2021-01-19T00:00&definitionId=1234&minimalTimeForIdleStatusInSec=120&userIds=24
Description:
Gets a custom report saved as favorite for the registrator user. The query parameters (users, period, other report-specific parameters) are given on the Website's UI, when the custom report is saved as favorite.
Signature:
public HttpResponseMessage GetFavoriteCustomReport(Guid companyAuthCode, int favoriteReportId)
Return values:
OK (StatusCode = 200 - OK), AuthCode is not valid (StatusCode = 401 - Unauthorized), Favorite report type is not custom (StatusCode = 400 - BadRequest), Error in report execution (StatusCode = 500 - InternalServerError), Unknown error (StatusCode = 500 - InternalServerError)
In case of "OK", the function returns a DataCollector object in JSON. (check "Classes" section for more details)
Arguments:
| Type |
Name |
Direction |
Description |
| Guid |
companyAuthCode |
In |
A globally unique identifier (GUID) which authenticates the company. Ask it from JC360 Support Team. |
| int |
favoriteReportId |
In |
The Id of the saved favorite report. You can get this value when you are logged in the website and pointing your mouse on the favorite report's "download excel" button on Central Reports page. The Id is visible in the status bar. |
Example code:
// HttpGet https://WEBSITEURL/api/restapi/GetFavoriteCustomReport?companyAuthCode=12345678-ABCD-1234-ABCD-1234567890AB&favoriteReportId=1234
Description:
Used for downloading custom datacollector reports
Members:
| Type |
Name |
Description |
| List<int> |
UserIds |
Report downloading will be executed for these userIds (and UserGroupIds below) |
| List<int> |
UserGroupIds |
Report downloading will be executed for these usergroupIds (and UserIds above) |
| Guid |
CompanyAuthCode |
A globally unique identifier (GUID) which authenticates the company. |
| DateTime |
UtcStartDate |
The report data will include data only after this utc date (and before the UtcEndDate) |
| DateTime |
UtcEndDate |
The report data will include data only before this utc date (and after the UtcStartDate) |
| int |
DefinitionId |
Id of the report (definitionId) that should be executed |
| int |
MinimalTimeForIdleStatusInSec |
Value for determining the idle time in the reports, only times over the given value will be considered as idle time |
| bool? |
IsCompressionRequired |
Represents whether the result have to be compressed, or not (GZipStream) |
Example code:
Description:
A DataCollectorReport object represents the result of a queried custom report.
Members:
| Type |
Name |
Description |
| DataSet |
ResultSet |
This property represents the results of all excel sheets in a downloaded report. A DataSet contains a property Tables, which is a List of DataTable objects. A DataTable object contains Columns, Rows and TableName properties. Each DataRow has a Cells property, which contains the data in each row, while each DataColumn contains the column's name and data type. |
| bool |
ShowReport |
Custom reports can indicate whether the report contains any relevant data. If this value is false then report does not contain any relevant data. |
Example code:
// here comes an example result of a report in JSON format // This report contains a single Table (Logs), which has a single row and a single column (Message) // The row has only one cell that contains a date
{ "ResultSet":{ "Tables":[ { "Columns":[ { "ColumnName":"Message", "DataType":"System.Object" }], "Rows":[ { "Cells":["2019. 10. 21. 12:32:00"] }], "TableName":"Logs", }] }, "ShowReport":true, }
Description:
Used for downloading custom favorite reports
Members:
| Type |
Name |
Description |
| Guid |
CompanyAuthCode |
A globally unique identifier (GUID) which authenticates the company. |
| int |
FavoriteReportId |
Id of the favorite report |
| bool |
IsCompressionRequired |
Represents whether the result have to be compressed, or not (GZipStream) |
Example code:
|
|