Data API

You can use these APIs to retrieve information about different objects on a page.

Global Data APIs

The following objects can be used in all locations and retrieved using data APIs:

loggedInUser - Returns information of a logged in agent.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("loggedInUser").then ( function(data) { // success operation // "data" is {loggedInUser: {agent: {…}}} }, function(error) { // failure operation } );
Sample Payload EXPAND ↓
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ "loggedInUser":{ "agent":{ "id": 1, "user_id": 1, "signature": null, "created_at": "2017-10-26T19:40:13+05:30", "updated_at": "2017-10-26T19:40:13+05:30", "ticket_permission": 1, "occasional": false, "google_viewer_id": null, "signature_html": null, "points": null, "scoreboard_level_id": null, "available": true, "active_since": null, "scopes": 1, "user":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:13+05:30", "deleted": false, "description": null, "email": "sample@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 1, "job_title": null, "language": "en", "mobile": null, "name": "Support", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:42:50+05:30", "department_names": "", "location_name": null }, "group_ids": "[]" } } }

The following table lists the attributes of the loggedInUser object.

ATTRIBUTE TYPE DESCRIPTION
available boolean If the agent is in a group that has enabled Automatic Ticket Assignment, this attribute will be set to 'true' if the agent is accepting new tickets.
created_at datetime Contact creation timestamp.
group_ids array of strings Group IDs associated with the agent.
id number User ID of the agent.
occasional boolean Set to 'true' if this is an occasional agent (false denotes full-time).
signature string Signature of the agent in HTML format.
updated_at datetime Agent updated timestamp.

domainName - Returns the domain name of the current account. Freshservice v2 APIs do not support custom CNAMEs, it is highly recommended that you use this method to obtain the Freshservice domain name and to make calls.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("domainName").then ( function(data) { // success operation // "data" is {"domainName":"sample.freshservice.com"} }, function(error) { // failure operation } );

The following table shows the attribute of the domainName object.

Attribute Type Description
domainName string Domain of the company. Email addresses of the contacts that contain this domain will be associated with that company automatically.
Ticket Details Page

The following objects can be retrieved using data APIs:

ticket - Returns the ticket object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("ticket").then ( function(data) { // success output // data is {ticket: {"subject": "What’s wrong with ..",..}} }, function(error) { // failure operation } );

Sample Payload

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ "ticket":{ "account_id": 1, "category": null, "cc_email":{ "cc_emails": "[]", "fwd_emails": "[]", "reply_cc": "[]", "tkt_cc": "[]" }, "created_at": "2017-10-26T19:40:18+05:30", "deleted": false, "department_id_value": null, "display_id": 1, "due_by": "2017-10-31T17:00:00+05:30", "email_config_id": null, "frDueBy": "2017-10-27T17:00:00+05:30", "fr_escalated": false, "group_id": null, "id": 1, "impact": 1, "import_id": null, "isescalated": false, "item_category": null, "notes": [{ "note":{ "created_at": "2017-10-26T19:40:18+05:30", "deleted": false, "id": 1, "incoming": false, "private": true, "source": 4, "updated_at": "2017-10-26T19:40:18+05:30", "user_id": 2, "body": "created_by: 1ntime: 2017-10-26 19:40:18 +0530", "body_html": "<div>created_by: 1<br>time: 2017-10-26 19:40:18 +0530</div>", "attachments": [], "support_email": null } }], "owner_id": null, "priority": 1, "requester_id": 2, "responder_id": null, "source": 2, "spam": false, "status": 2, "sub_category": null, "subject": "What’s wrong with my email?", "ticket_type": "Incident", "to_email": null, "updated_at": "2017-10-26T19:40:18+05:30", "urgency": 1, "description": "Hi Team, I have been unable to send any emails since this morning. What’s going on? Regards, Andrea", "description_html": "<div>Hi Team,<br/> <br/>I have been unable to send any emails since this morning. What’s going on?<br/><br/>Regards,<br/> Andrea </div>", "status_name": "Open", "requester_status_name": "Being Processed", "priority_name": "Low", "source_name": "Portal", "requester_name": "Andrea", "responder_name": "No Agent", "to_emails": null, "department_name": null, "assoc_problem_id": 1, "assoc_change_id": 1, "assoc_change_cause_id": null, "assoc_asset_id": null, "urgency_name": "Low", "impact_name": "Low", "attachments": "[]", "custom_field":{}, "tags": "[]" } }
EXPAND ↓

The following table lists the attributes of the ticket object.

ATTRIBUTE TYPE DESCRIPTION
cc_email object of arrays Email address added in the 'cc' field of the incoming ticket email.
department_id number ID of the department.
created_at datetime Ticket creation timestamp.
custom_field object Key value pairs containing names and values of custom fields.
description_html string HTML content of the ticket.
description string Content of the ticket in plain text.
due_by datetime Timestamp indicating when the ticket is due to be resolved.
email_config_id number ID of the email config which is used for this ticket.
frDueBy datetime Timestamp indicating when the first response is due.
fr_escalated boolean Set to 'true' if the ticket has been escalated as the result of the first response time being breached.
group_id number ID of the group to which the ticket has been assigned.
id number ID of the ticket.
isescalated boolean Set to 'true' if the ticket has been escalated for any reason.
priority number Ticket priority value.
priority_name string Ticket priority text.
requester_id number User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
responder_id number ID of the agent to whom the ticket has been assigned.
source number The channel through which the ticket was created. This field contains the source value.
source_name string This field contains the source text.
spam boolean Set to 'true' if the ticket has been marked as spam.
status number Ticket status value.
status_name string Ticket status text.
subject string Subject of the ticket.
tags array of strings Tags that have been associated with the ticket.
ticket_type string This field categorizes the ticket according to the different kinds of issues your support team deals with.
updated_at datetime Ticket updated timestamp.

Tickets use certain numbers to denote source, status, and priority. These numbers and their values are listed.

Source Value
Email 1
Portal 2
Phone 3
Chat 4
Feedback Widget 5
Yammer 6
AWS CloudWatch 7
Pagerduty 8
Walk-up 9
Slack 10
Status Value
Open 2
Pending 3
Resolved 4
Closed 5
Priority Value
Low 1
Medium 2
High 3
Urgent 4

The following table lists the attributes of the attachments object.

ATTRIBUTE TYPE DESCRIPTION
attachment_url string URL of the attachment.
content_type string Information on the type of the attachment, for example - image/png, text, zip, and so on.
created_at datetime Attachment file creation timestamp.
id number ID of the attachment.
content_file_name string Attachment file name.
content_file_size number Attached file size.
updated_at datetime Attachment updated timestamp.


requester - Returns the contact/requester object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requester").then ( function(data) { // success output // data is {requester: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ "requester":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:17+05:30", "deleted": false, "description": null, "email": "andrea@freshservice.com", "external_id": null, "helpdesk_agent": false, "id": 2, "job_title": "Manager", "language": "en", "mobile": null, "name": "Andrea", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:40:17+05:30", "department_names": "", "location_name": null, "custom_field":{} } }
EXPAND ↓

The following table lists the attributes of the requester/contact object.

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to 'true' if the user has been verified.
address string Address of the user.
created_at datetime User creation timestamp.
custom_field dictionary Key value pairs containing the names and values of the custom fields.
deleted boolean Set to 'true' if the user has been deleted.
description string A short description of the user.
email string Primary email address of the user. If you want to associate additional email(s) with this user, use the other_emails attribute.
external_id number ID of the user in an external system.
helpdesk_agent boolean Set to 'true' if the user is an agent.
id number ID of the user.
job_title string Job title of the user.
language string Language of the user.
mobile number Mobile number of the user.
name string Name of the user.
phone number Telephone number of the user.
time_zone string Time zone in which the user resides.
updated_at datetime User updated timestamp.

agent - Returns the agentobject.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("agent").then ( function(data) { // success output // data is {agent: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ "agent":{ "active_since": null, "available": true, "created_at": "2017-10-26T19:40:13+05:30", "id": 1, "occasional": false, "points": null, "scoreboard_level_id": null, "signature": null, "signature_html": null, "ticket_permission": 1, "updated_at": "2017-10-26T19:40:13+05:30", "user_id": 1, "user":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:13+05:30", "deleted": false, "description": null, "email": "sample@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 1, "job_title": null, "language": "en", "mobile": null, "name": "Support", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:42:50+05:30" } } }
EXPAND ↓

The following table lists the attributes of the agent object.

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to 'true' if the user has been verified.
address string Address of the user.
created_at datetime User creation timestamp.
deleted boolean Set to 'true' if the user has been deleted.
description string A short description of the user.
email string Primary email address of the user. If you want to associate additional email(s) with this user, use the other_emails attribute.
external_id number ID of the user in an external system.
helpdesk_agent boolean Set to 'true' if the user is an agent.
id number ID of the user.
job_title string Job title of the user.
language string Language of the user.
mobile number Mobile number of the user.
name string Name of the user.
phone number Telephone number of the user.
time_zone string Time zone in which the user resides.
updated_at datetime User updated timestamp.

department - Returns the department object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("department").then ( function(data) { // success output // data is {department: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ "department":{ "created_at": "2017-10-26T19:40:31+05:30", "description": "Support Team", "head_id": null, "id": 3, "name": "Customer Support", "prime_user_id": null, "updated_at": "2017-10-26T19:40:31+05:30", "head_name": null, "prime_user_name": null, "custom_field":{} } }
EXPAND ↓

The following table lists the attributes of the deparment object.

ATTRIBUTE TYPE DESCRIPTION
created_at datetime Department created timestamp.
custom_field object Key value pairs containing names and values of custom fields.
description string A short description of the department.
id number ID of the department.
name string Name of the department.
updated_at datetime Department updated timestamp.

group - Returns the group object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("group").then ( function(data) { // success output // data is {group: {…}} }, function(error) { // failure operation } );

Sample Payload

1
2
3
4
5
6
7
{ "group":{ "id": 9, "name": "Capacity Management Team", "agent_ids": "[]" } }

The following table lists the attributes of the group object.

ATTRIBUTE TYPE DESCRIPTION
agent_ids array of numbers Array of agent IDs separated by commas.
id number ID of the group.
name string Name of the group.

associatedProblem - Returns the associated problem object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("associatedProblem").then ( function(data) { // success output // data is {associatedProblem: {…}} }, function(error) { // failure operation } );

Sample Payload

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "associatedProblem":{ "category": null, "created_at": "2017-12-07T16:37:41+05:30", "due_by": "2017-12-21T16:37:40+05:30", "group_id": null, "impact": 1, "item_category": null, "known_error": false, "owner_id": null, "priority": 1, "requester_id": 4, "status": 1, "sub_category": null, "subject": "Unable to reach email server", "updated_at": "2017-12-07T16:37:41+05:30", "id": 1 } }
EXPAND ↓

The following table lists the attributes of the associated problem object.

ATTRIBUTE TYPE DESCRIPTION
category string Problem category.
created_at datetime Problem creation timestamp.
due_by datetime Timestamp indicating when the problem is due to be resolved.
group_id number ID of the group to which the problem is assigned.
impact number Impact of the problem.
item_category string Item category of the problem.
known_error boolean Set to 'true' if the problem is a known error.
owner_id number ID of the agent to whom the problem is assigned.
priority number Priority of the problem.
requester_id number User ID of the requester.
status number Status of the problem.
sub_category string Sub-category of the problem.
subject string Subject of the problem.
updated_at datetime Problem updated timestamp.
id number ID of the problem.

associatedChange - Returns the associated change object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("associatedChange").then ( function(data) { // success output // data is {associatedChange: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ "associatedChange":{ "approval_status": 4, "category": null, "change_type": 1, "created_at": "2017-12-07T16:37:40+05:30", "group_id": null, "impact": 1, "item_category": null, "owner_id": null, "planned_end_date": "2017-12-21T16:37:40+05:30", "planned_start_date": "2017-12-21T16:37:40+05:30", "priority": 1, "requester_id": 4, "risk": 1, "status": 1, "sub_category": null, "subject": "Getting ES3 back up to speed", "updated_at": "2017-12-07T16:37:40+05:30", "id": 1 } }
EXPAND ↓

The following table lists the attributes of the associated change object.

ATTRIBUTE TYPE DESCRIPTION
approval_status number Approval status of the change.
category string Change category.
change_type number Type of change.
created_at datetime Change creation timestamp.
group_id number ID of the group to which the change is assigned.
impact number Impact of the change.
item_category string Item category of the change.
owner_id number ID of the agent to whom the change is assigned.
planned_end_date datetime Planned end date.
planned_start_date datetime Planned start date.
priority number Priority of the change.
requester_id number User ID of the requester.
risk number Risk of the change.
status number Status of the change.
sub_category string Sub-category of the change.
subject string Subject of the change.
updated_at datetime Change updated timestamp.
id number ID of the change.


associatedTasks - Returns the associated tasks object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("associatedTasks").then ( function(data) { // success output // data is {associatedTasks: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ "associatedTasks":[{ "closed_at": null, "created_at": "2017-12-14T12:29:26+05:30", "deleted": false, "description": "", "due_date": "2017-12-15T17:00:00+05:30", "group_id": null, "owner_id": 1, "status": 1, "title": "Sample Task", "updated_at": "2017-12-14T12:29:26+05:30", "user_id": 1, "id": 22 }] }
EXPAND ↓

The following table lists the attributes of the associated tasks object.

ATTRIBUTE TYPE DESCRIPTION
closed_at datetime Task closed at timestamp.
created_at datetime Task creation timestamp.
deleted boolean Set to 'true' if the task is deleted.
description string Description of the task.
due_date datetime Due date of the task.
group_id number ID of the group assigned to the task.
owner_id number User ID of the assigned agent.


recentChildTickets - Returns the recent child tickets object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("recentChildTickets").then ( function(data) { // success output // data is {recentChildTickets: {…}} }, function(error) { // failure operation } );

Sample Payload

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ "recentChildTickets":[{ "category": null, "cc_email":{ "cc_emails": [], "fwd_emails": [], "reply_cc": [], "tkt_cc": [] }, "created_at": "2017-12-14T13:17:46+05:30", "deleted": false, "due_by": "2017-12-19T13:17:46+05:30", "frDueBy": "2017-12-15T13:17:46+05:30", "fr_escalated": false, "group_id": null, "isescalated": false, "item_category": null, "owner_id": null, "priority": 1, "requester_id": 2, "responder_id": null, "source": 2, "status": 2, "sub_category": null, "subject": "Sample Child Ticket", "ticket_type": "Incident", "updated_at": "2017-12-14T13:17:46+05:30", "id": 10 }] }
EXPAND ↓

The following table lists the attributes of the recent child tickets object.

ATTRIBUTE TYPE DESCRIPTION
category string Ticket category.
cc_email array of strings Email address added in the 'cc' field of the incoming ticket email.
created_at datetime Ticket creation timestamp.
deleted boolean Set as 'true' if the ticket is deleted/trashed. Deleted tickets will not be considered in any views except the "deleted" filter.
due_by datetime Timestamp indicating when the ticket is due to be resolved.
frDueby datetime Timestamp indicating when the first response is due.
group_id number ID of the group to which the ticket is assigned.
isescalated boolean Set to 'true' if an escalation was sent.
item_category string Item category of the ticket.
responder_id number ID of the agent to whom the ticket is assigned.
priority number Priority of the ticket.
requester_id number User ID of the requester.
source number The channel through which the ticket was created.
status number Status of the ticket.
sub_category string Sub-category of the ticket.
subject string Subject of the ticket.
ticket_type number Type property field as defined in the parent ticket fields.
updated_at datetime Ticket updated timestamp.
id number ID of the ticket.


requesterassets - Returns the requester associated assets object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requesterAssets").then ( function(data) { // success output // data is {requesterAssets: {…}} }, function(error) { // failure operation } );

Sample Payload

1
2
3
4
5
6
7
8
9
10
11
{ "requesterAssets":[{ "agent_id": null, "created_at": "2017-12-07T16:37:44+05:30", "impact": 2, "name": "Andrea's Laptop", "updated_at": "2017-12-07T16:37:44+05:30", "user_id": 2, "id": 1 }] }
EXPAND ↓

ticketassets - Returns the ticket associated assets object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("ticketAssets").then ( function(data) { // success output // data is {ticketAssets: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
{ "ticketAssets":[{ "agent_id": null, "created_at": "2017-12-07T16:37:44+05:30", "impact": 2, "name": "Andrea's Laptop", "updated_at": "2017-12-07T16:37:44+05:30", "user_id": 2, "id": 1 }] }
EXPAND ↓

The following table lists the attributes of the ticket associated assets object.

ATTRIBUTE TYPE DESCRIPTION
agent_id number ID of the associated agent.
created_at datetime Asset creation timestamp.
impact number Impact of the item.
name string Name of the item.
updated_at datetime Asset updated timestamp.
user_id number ID of the item user.
id number ID of the item.

Contact Details Page

The following objects can be retrieved using data APIs:

requester() - Returns the requester object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requester").then ( function(data) { // success output // data: {requester: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ "requester":{ "user":{ "active": false, "address": null, "created_at": "2017-10-26T19:40:17+05:30", "deleted": false, "description": null, "email": "andrea@freshservice.com", "external_id": null, "helpdesk_agent": false, "id": 2, "job_title": "Manager", "language": "en", "mobile": null, "name": "Andrea", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:40:17+05:30", "custom_field":{} } } }
EXPAND ↓

The following table lists the attributes of the requester object.

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to 'true' if the user has been verified.
address string Address of the user.
created_at datetime User creation timestamp.
custom_field object Key value pairs containing the names and values of the custom fields.
description string A short description of the user.
email string Primary email address of the user.
id number ID of the user.
job_title string Job title of the user.
language string Language of the user.
mobile string Mobile number of the user.
name string Name of the user.
phone string Telephone number of the user.
time_zone string Time zone in which the user resides.
updated_at datetime User updated timestamp.

department() - Returns the department object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("department").then ( function(data) { // success output // data: {department: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ "department":{ "departments": [{ "created_at": "2017-10-26T19:40:31+05:30", "description": "Support Team", "head_id": null, "id": 3, "name": "Customer Support", "prime_user_id": null, "updated_at": "2017-10-26T19:40:31+05:30", "custom_field":{}, "head_name": null, "prime_user_name": null },{ "created_at": "2017-10-26T19:40:31+05:30", "description": "Development Team", "head_id": null, "id": 1, "name": "Development", "prime_user_id": null, "updated_at": "2017-10-26T19:40:31+05:30", "custom_field":{}, "head_name": null, "prime_user_name": null }] } }
EXPAND ↓

The following table lists the attributes of the department object.

ATTRIBUTE TYPE DESCRIPTION
id number ID of the department.
name string Name of the department.

Change Details Page

The following objects can be retrieved using data APIs:

change - Returns the change object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("change").then ( function(data) { // success output // data is {change: {"subject": "Getting ES3 back..",..}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ "change":{ "itil_change":{ "approval_status": 4, "approval_type": null, "category": null, "cc_email":{}, "change_type": 1, "created_at": "2017-10-26T19:40:34+05:30", "deleted": false, "department_id": null, "display_id": 1, "email_config_id": null, "group_id": null, "id": 1, "impact": 1, "import_id": null, "item_category": null, "owner_id": null, "planned_end_date": "2017-11-09T19:40:34+05:30", "planned_start_date": "2017-11-09T19:40:34+05:30", "priority": 1, "project_id": null, "requester_id": 4, "risk": 1, "status": 1, "sub_category": null, "subject": "Getting ES3 back up to speed", "updated_at": "2017-10-26T19:40:34+05:30", "status_name": "Open", "impact_name": "Low", "priority_name": "Low", "requester_name": "Rachel", "owner_name": null, "group_name": null, "risk_type": "Low", "change_type_name": "Minor", "approval_status_name": "Not Requested", "description": null, "assoc_release_id": 1, "attachments": "[]", "notes": "[]", "custom_field_values":{} } } }
EXPAND ↓

The following table lists the attributes of the change object.

ATTRIBUTE TYPE DESCRIPTION
attachments array of objects Change attachments.
cc_email object of arrays Email address added in the 'cc' field of the change.
department_id number ID of the department to which this change belongs.
created_at datetime Change creation timestamp.
custom_field object Key value pairs containing the names and values of custom fields.
description string Content of the change in plain text.
email_config_id number ID of email config which is used for this change.
group_id number ID of the group to which the change has been assigned.
id number ID of the change.
priority number Change priority value.
priority_name string Change priority text.
requester_id number User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
owner_id number ID of the agent to whom the change has been assigned.
status number Change status value.
status_name string Change status text.
subject string Subject of the change.
change_type string This field categorizes the change according to the different kinds of issues your support team deals with.
updated_at datetime Change updated timestamp.

Changes use certain numbers to denote source, status, and priority. These numbers and their values are listed.

Status Value
Open 1
Planning 2
Awaiting Approval 3
Pending Release 4
Pending Review 5
Closed 6
Priority Value
Low 1
Medium 2
High 3
Urgent 4

The following table lists the attributes of the attachments object.

ATTRIBUTE TYPE DESCRIPTION
attachment_url string URL of the attachment.
content_content_type string Information on the type of the attachment, for example - image/png, text, zip, and so on.
created_at datetime Attachment file creation timestamp.
id number ID of the attachment.
content_file_name string Attachment file name.
content_file_size number Attached file size.
updated_at datetime Attachment updated timestamp.


requester - Returns the requester object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("requester").then ( function(data) { // success output // data is {requester: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ "requester":{ "user":{ "active": false, "address": null, "created_at": "2017-10-26T19:40:22+05:30", "deleted": true, "description": null, "email": "rachel@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 4, "job_title": null, "language": "en", "mobile": null, "name": "Rachel", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:40:22+05:30", "department_names": "", "location_name": null } } }
EXPAND ↓

The following table lists the attributes of the requester object.

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to 'true' if the user has been verified.
address string Address of the user.
created_at datetime User creation timestamp.
custom_field dictionary Key value pairs containing the names and values of custom fields.
deleted boolean Set to 'true' if the user has been deleted.
description string A short description of the user.
email string Primary email address of the user. If you want to associate additional email(s) with this user, use the other_emails attribute.
external_id number ID of the user in an external system.
helpdesk_agent boolean Set to 'true' if the user is an agent.
id number ID of the user.
job_title string Job title of the user.
language string Language of the user.
mobile number Mobile number of the user.
name string Name of the user.
phone number Telephone number of the user.
time_zone string Time zone in which the user resides.
updated_at datetime User updated timestamp.

agent - Returns the agent object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("agent").then ( function(data) { // success output // data is {agent: {"active": "true"}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ "agent":{ "active_since": null, "available": true, "created_at": "2017-10-26T19:40:13+05:30", "id": 1, "occasional": false, "points": null, "scoreboard_level_id": null, "signature": null, "signature_html": null, "ticket_permission": 1, "updated_at": "2017-10-26T19:40:13+05:30", "user_id": 1, "user":{ "active": true, "address": null, "created_at": "2017-10-26T19:40:13+05:30", "deleted": false, "description": null, "email": "sample@freshservice.com", "external_id": null, "helpdesk_agent": true, "id": 1, "job_title": null, "language": "en", "mobile": null, "name": "Support", "phone": null, "time_zone": "Chennai", "updated_at": "2017-10-26T19:42:50+05:30" } } }
EXPAND ↓

The following table lists the attributes of the agent object.

ATTRIBUTE TYPE DESCRIPTION
active boolean Set to 'true' if the user has been verified.
address string Address of the user.
created_at datetime User creation timestamp.
deleted boolean Set to 'true' if the user has been deleted.
description string A short description of the user.
email string Primary email address of the user. If you want to associate additional email(s) with this user, use the other_emails attribute.
external_id number ID of the user in an external system.
helpdesk_agent boolean Set to 'true' if the user is an agent.
id number ID of the user.
job_title string Job title of the user.
language string Language of the user.
mobile number Mobile number of the user.
name string Name of the user.
phone number Telephone number of the user.
time_zone string Time zone in which the user resides.
updated_at datetime User updated timestamp.

group - Returns the group object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("group").then ( function(data) { // success output // data is {group: {…}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
{ "group":{ "id": 9, "name": "Capacity Management Team", "agent_ids": "[]" } }

The following table lists the attributes of the group object.

ATTRIBUTE TYPE DESCRIPTION
agent_ids array of numbers Array of agent user IDs separated by commas.
id number ID of the group.
name string Name of the group.

backoutPlan - Returns the backout plan description.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("backoutPlan").then ( function(data) { // success operation // "data" is {"backoutPlan":"description of the backout plan"} }, function(error) { // failure operation } );

Attribute Type Description
backoutPlan string Description of the backout plan.

changeImpact - Returns the change impact description.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("changeImpact").then ( function(data) { // success operation // "data" is {"changeImpact":"description of the change impact"} }, function(error) { // failure operation } );

Attribute Type Description
changeImpact string Description of the change impact.

changePlan - Returns the change plan description.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("changePlan").then ( function(data) { // success operation // "data" is {"changePlan":"description of the change plan"} }, function(error) { // failure operation } );

Attribute Type Description
changePlan string Description of the change plan.

changeReason - Returns the change reason description.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("changeReason").then ( function(data) { // success operation // "data" is {"changeReason":"description of the change reason"} }, function(error) { // failure operation } );

Attribute Type Description
changeReason string Description of the change reason.

Asset Details Page

The asset object can be retrieved using data APIs.

asset - Returns the asset object.

Copied Copy
1
2
3
4
5
6
7
8
9
client.data.get("asset").then ( function(data) { // success output // data is {asset: {"subject": "What’s wrong with ..",..}} }, function(error) { // failure operation } );

Payload Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ "id":1, "name":"Macbook Pro", "description":"", "ci_type_id":25, "impact":2, "created_at":"2019-03-07T15:08:00+05:30", "updated_at":"2019-03-13T15:26:22+05:30", "user_id":2, "department_id":null, "group_id":null, "assigned_on":null, "agent_id":null, "display_id":1, "location_id":null, "depreciation_id":null, "salvage":null, "usage_type":1, "asset_tag":"ASSET-1", "department_name":null, "used_by":"Andrea", "business_impact":"Medium", "agent_name":null, "levelfield_values": { "product_3":1, "vendor_3":26, "cost_3":"34.0", "warranty_3":28, "acquisition_date_3":null, "warranty_expiry_date_3":null, "domain_3":null, "asset_state_3":1, "serial_number_3":null, "last_audit_date_3":null, "os_8":"Mac", "os_version_8":"OS X", "os_service_pack_8":null, "memory_8":null, "disk_space_8":null, "cpu_speed_8":null, "cpu_core_count_8":null, "mac_address_8":null, "uuid_8":null, "hostname_8":null, "computer_ip_address_8":null, "last_login_by_8":null }, "ci_type_name":"Laptop", "product_name":"Apple MacBook Air 13", "vendor_name":"vendor 26", "state_name":"In Use", "location_name":null }
EXPAND ↓

The following table lists the attributes of the asset object.

ATTRIBUTE TYPE DESCRIPTION
id number ID of the asset.
name string Name of the asset.
description string Description of the asset.
ci_type_id number ID of the asset type.
ci_type_name string Name of the asset type.
impact number ID of the impact.
business_impact string Name of the impact.
usage_type number Usage type of the asset.
user_id number ID of the associated user (used by).
used_by string Name of the associated user (used by).
department_id number ID of the associated department.
department_name string Name of the associated department.
agent_id number ID of the associated agent (managed by).
agent_name string Name of the associated agent (managed by).
group_id number ID of the associated agent group (managed by group).
assigned_on datetime Date at which the asset is assigned.
display_id number Display ID of the asset.
location_id number ID of the associated location.
location_name string Name of the location associated to the asset.
asset_tag string Asset tag of the asset.
product_name string Name of the product associated to the asset.
vendor_name string Name of the vendor associated to the asset.
state_name string Name of the state associated to the asset.

Each asset has distinct properties, such as impact and usage type, for which the values are listed.

Impact Values
Low 1
Medium 2
High 3
Usage Type Values
Permanent 1
Loaner 2