<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs
Release Worklog
Helps you track and capture the work done by a team member. The same can be associated with Requests, Problems, Tasks, and Changes.
Attributes
id (long)
Unique identifier of the worklog.
owner (user)
Contains Name and ID of the User to whom the worklog is assigned.
start_time (datetime)
Date and time to start the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
end_time (datetime)
Date and time to end the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
include_nonoperational_hours (boolean)
Attribute to decide whether to include non operational hours or not.
created_time (datetime)read only
Date and time of creation of Worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
More Attributes Expand all
created_by (user)read only
This attribute holds the user who created the worklog This attribute is applicable only for output and will be ignored in input fields.
Add Release Worklog
This operation helps you add a new worklog for the given input.
Mandatory Fields :- owner
Url
Attributes
id (long)
Unique identifier of the worklog.
owner (user)
Contains Name and ID of the User to whom the worklog is assigned.
start_time (datetime)
Date and time to start the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
end_time (datetime)
Date and time to end the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
include_nonoperational_hours (boolean)
Attribute to decide whether to include non operational hours or not.
created_time (datetime)read only
Date and time of creation of Worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
More Attributes Expand all
created_by (user)read only
This attribute holds the user who created the worklog This attribute is applicable only for output and will be ignored in input fields.
$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs\
-X POST\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"\
-d input_data='{
"worklog": {
"owner": {
"id": "4"
},
"description": "New Worklog Added",
"start_time": {
"value": "1586419380000"
},
"end_time": {
"value": "1586505780000"
},
"time_spent": {
"hours": "24",
"minutes": "0"
},
"other_cost": "0",
"type": {
"id": "1"
},
"include_nonoperational_hours": true,
"mark_first_response": false
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
"worklog": {
"owner": {
"id": "4"
},
"description": "New Worklog Added",
"start_time": {
"value": "1586419380000"
},
"end_time": {
"value": "1586505780000"
},
"time_spent": {
"hours": "24",
"minutes": "0"
},
"other_cost": "0",
"type": {
"id": "1"
},
"include_nonoperational_hours": true,
"mark_first_response": false
}
};
params = {"input_data": input_data};
response = invokeurl
[
url: url
type: POST
parameters: params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"worklog": {
"owner": {
"id": "4"
},
"description": "New Worklog Added",
"start_time": {
"value": "1586419380000"
},
"end_time": {
"value": "1586505780000"
},
"time_spent": {
"hours": "24",
"minutes": "0"
},
"other_cost": "0",
"type": {
"id": "1"
},
"include_nonoperational_hours": true,
"mark_first_response": false
}
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"worklog": {
"owner": {
"id": "4"
},
"description": "New Worklog Added",
"start_time": {
"value": "1586419380000"
},
"end_time": {
"value": "1586505780000"
},
"time_spent": {
"hours": "24",
"minutes": "0"
},
"other_cost": "0",
"type": {
"id": "1"
},
"include_nonoperational_hours": true,
"mark_first_response": false
}
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="POST")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
},
"worklog": {
"owner": {
"email_id": null,
"cost_per_hour": 0,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"created_time": {
"display_value": "Apr 11, 2020 08:56 PM",
"value": "1586618815555"
},
"include_nonoperational_hours": true,
"associated_entity": "release",
"release": {
"short_description": "MSSQL Server service pack upgrade",
"display_id": "1",
"id": "1",
"title": "MSSQL Server service pack upgrade"
},
"end_time": {
"display_value": "Apr 10, 2020 01:33 PM",
"value": "1586505780000"
},
"description": "New Worklog Added",
"other_cost": "0.00",
"total_cost": "0.00",
"created_by": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"time_spent": {
"hours": "24",
"minutes": "00"
},
"tech_cost": "0.00",
"start_time": {
"display_value": "Apr 9, 2020 01:33 PM",
"value": "1586419380000"
},
"stage": null,
"type": {
"color": null,
"name": "Custom",
"id": "1"
},
"id": "1"
}
}
Edit Release Worklog
This operation helps you update the worklog for the given worklog_Id.
Url
<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}
Attributes
id (long)
Unique identifier of the worklog.
owner (user)
Contains Name and ID of the User to whom the worklog is assigned.
start_time (datetime)
Date and time to start the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
end_time (datetime)
Date and time to end the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
include_nonoperational_hours (boolean)
Attribute to decide whether to include non operational hours or not.
created_time (datetime)read only
Date and time of creation of Worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
More Attributes Expand all
created_by (user)read only
This attribute holds the user who created the worklog This attribute is applicable only for output and will be ignored in input fields.
$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}\
-X PUT\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"\
-d input_data='{
"worklog": {
"description": "New Worklog Added"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
"worklog": {
"description": "New Worklog Added"
}
};
params = {"input_data": input_data};
response = invokeurl
[
url: url
type: PUT
parameters: params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"worklog": {
"description": "New Worklog Added"
}
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"worklog": {
"description": "New Worklog Added"
}
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
},
"worklog": {
"owner": {
"email_id": null,
"cost_per_hour": 0,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"created_time": {
"display_value": "Apr 11, 2020 08:56 PM",
"value": "1586618815555"
},
"include_nonoperational_hours": true,
"associated_entity": "release",
"release": {
"short_description": "MSSQL Server service pack upgrade",
"display_id": "1",
"id": "1",
"title": "MSSQL Server service pack upgrade"
},
"end_time": {
"display_value": "Apr 9, 2020 06:33 PM",
"value": "1586437380000"
},
"description": "Worklog Updated",
"other_charge": "0.00",
"total_charge": "0.00",
"created_by": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"time_spent": {
"hours": "05",
"minutes": "00"
},
"tech_charge": "0.00",
"start_time": {
"display_value": "Apr 9, 2020 01:33 PM",
"value": "1586419380000"
},
"stage": null,
"worklog_type": {
"color": null,
"name": "Custom",
"id": "1"
},
"id": "1"
}
}
Get Release Worklog
This operation helps you retrieve the work-log details for the worklog_id provided.
Url
<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}
Attributes
id (long)
Unique identifier of the worklog.
owner (user)
Contains Name and ID of the User to whom the worklog is assigned.
description (html)
Description about the worklog.
start_time (datetime)
Date and time to start the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
end_time (datetime)
Date and time to end the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
other_cost (double)
Extra worklog costs other than the Owner cost.
More Attributes Expand all
include_nonoperational_hours (boolean)
Attribute to decide whether to include non operational hours or not.
type (worklog_type)
Used to categorize the worklogs of similar cases. Object has “id” and/or “name” of the worklog type.
udf_fields (udf_fields)
User Defined Fields that need to appear in the new worklog form apart from the pre-set fields.
created_by (user)read only
This attribute holds the user who created the worklog This attribute is applicable only for output and will be ignored in input fields.
$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
response = invokeurl
[
url: url
type: GET
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
},
"worklog": {
"owner": {
"email_id": null,
"cost_per_hour": 0,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"created_time": {
"display_value": "Apr 11, 2020 08:56 PM",
"value": "1586618815555"
},
"include_nonoperational_hours": true,
"associated_entity": "release",
"release": {
"short_description": "MSSQL Server service pack upgrade",
"display_id": "1",
"id": "1",
"title": "MSSQL Server service pack upgrade"
},
"end_time": {
"display_value": "Apr 10, 2020 01:33 PM",
"value": "1586505780000"
},
"description": "New Worklog Added",
"other_charge": "0.00",
"total_charge": "0.00",
"created_by": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"time_spent": {
"hours": "24",
"minutes": "00"
},
"tech_charge": "0.00",
"start_time": {
"display_value": "Apr 9, 2020 01:33 PM",
"value": "1586419380000"
},
"stage": null,
"worklog_type": {
"color": null,
"name": "Custom",
"id": "1"
},
"id": "1"
}
}
Get List Release Worklog
This operation helps you view all the worklogs for the given release.
Url
<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs
Attributes
id (long)
Unique identifier of the worklog.
owner (user)
Contains Name and ID of the User to whom the worklog is assigned.
description (html)
Description about the worklog.
start_time (datetime)
Date and time to start the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
end_time (datetime)
Date and time to end the worklog. JSON Object has the “value” in milliseconds and “display_value” in the standard date format.
other_cost (double)
Extra worklog costs other than the Owner cost.
More Attributes Expand all
include_nonoperational_hours (boolean)
Attribute to decide whether to include non operational hours or not.
type (worklog_type)
Used to categorize the worklogs of similar cases. Object has “id” and/or “name” of the worklog type.
udf_fields (udf_fields)
User Defined Fields that need to appear in the new worklog form apart from the pre-set fields.
created_by (user)read only
This attribute holds the user who created the worklog This attribute is applicable only for output and will be ignored in input fields.
$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"\
--data-urlencode input_data='{
"list_info": {
"row_count": 100
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
input_data = {
"list_info": {
"row_count": 100
}
};
params = {"input_data":input_data};
response = invokeurl
[
url: url
type: GET
parameters:params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{
"list_info": {
"row_count": 100
}
}'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"list_info": {
"row_count": 100
}
}'''
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"list_info": {
"has_more_rows": false,
"start_index": 1,
"row_count": 2
},
"worklogs": [
{
"owner": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"created_time": {
"display_value": "Apr 11, 2020 08:56 PM",
"value": "1586618815555"
},
"include_nonoperational_hours": true,
"associated_entity": "release",
"release": {
"short_description": "MSSQL Server service pack upgrade",
"display_id": "1",
"id": "1",
"title": "MSSQL Server service pack upgrade"
},
"end_time": {
"display_value": "Apr 10, 2020 01:33 PM",
"value": "1586505780000"
},
"description": "New Worklog Added",
"other_charge": "0.00",
"total_charge": "0.00",
"created_by": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"time_spent": {
"hours": "24",
"minutes": "00"
},
"tech_charge": "0.00",
"start_time": {
"display_value": "Apr 9, 2020 01:33 PM",
"value": "1586419380000"
},
"stage": null,
"worklog_type": {
"color": null,
"name": "Custom",
"id": "1"
},
"id": "1"
},
{
"owner": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"created_time": {
"display_value": "Apr 11, 2020 09:09 PM",
"value": "1586619587901"
},
"include_nonoperational_hours": true,
"associated_entity": "release",
"release": {
"short_description": "MSSQL Server service pack upgrade",
"display_id": "1",
"id": "1",
"title": "MSSQL Server service pack upgrade"
},
"end_time": {
"display_value": "Apr 10, 2020 01:33 PM",
"value": "1586505780000"
},
"description": "New Worklog Added",
"other_charge": "0.00",
"total_charge": "0.00",
"created_by": {
"email_id": null,
"name": "administrator",
"is_vipuser": false,
"id": "4",
"department": null
},
"time_spent": {
"hours": "24",
"minutes": "00"
},
"tech_charge": "0.00",
"start_time": {
"display_value": "Apr 9, 2020 01:33 PM",
"value": "1586419380000"
},
"stage": null,
"worklog_type": {
"color": null,
"name": "Custom",
"id": "1"
},
"id": "2"
}
]
}
Delete Release Worklog
This operation helps you delete a worklog based on the worklog_id.
Url
<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}
$ curl <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}\
-X DELETE\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
response = invokeurl
[
url: url
type: DELETE
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/{worklog_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Worklog Timetaken
This operation helps you obtain the timespent value.
Url
<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/_get_time_spent
$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/_get_time_spent\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/_get_time_spent";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
response = invokeurl
[
url: url
type: GET
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/_get_time_spent"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/_get_time_spent"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
},
"worklog": {
"time_spent": {
"hours": "09",
"minutes": "00"
}
}
}
Worklog Summary
This operation helps you get worklog summary containing total timespent and total total_charge.
Url
<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/summary
$ curl -G <service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/summary\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/summary";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"};
response = invokeurl
[
url: url
type: GET
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/summary"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>//api/v3/releases/{release_id}/worklogs/summary"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "authtoken: 6FXXXXX2-0XXX-XXXX-XXXX-5XXXXXAXXXXX",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"worklog": {
"timespentSum": "322 Hrs 41 Mins ",
"totalChargeSum": 0
}
}