Start a new topic
Answered

Service Request Details through the API

First, I can connect to the API and that works great.  I'm able to pull ticket details, but I'd like to use the information collected to execute some immediate remediation to an incident, or, as I'm trying to do now, use the data collected from the Service Catalog to automate a deployment.  

As I said, I'm able to query the API and get ticket details.  They come back as follows: 

cc_email              : @{cc_emails=System.Object[]; fwd_emails=System.Object[]; reply_cc=System.Object[]; tkt_cc=System.Object[]}
created_at            : 2018-10-10T14:38:22-05:00
deleted               : False
department_id_value   : 
display_id            : 12250
due_by                : 2018-10-11T14:38:22-05:00
email_config_id       : 
frDueBy               : 2018-10-11T13:38:22-05:00
fr_escalated          : False
group_id              : 
id                    : 3009609626
impact                : 1
isescalated           : False
notes                 : {}
owner_id              : 
priority              : 2
requester_id          : 3001021664
responder_id          : 
source                : 2
spam                  : False
status                : 2
subject               : Request for Aaron Ebertowski : ONBOARDING:  Create New Customer
ticket_type           : Service Request
to_email              : 
updated_at            : 2018-10-10T14:38:22-05:00
urgency               : 1
description           : 
description_html      : 
status_name           : Open
requester_status_name : Being Processed
priority_name         : Medium
source_name           : Portal
requester_name        : Aaron Ebertowski
responder_name        : No Agent
to_emails             : 
department_name       : IT Company
assoc_problem_id      : 
assoc_change_id       : 
assoc_change_cause_id : 
assoc_asset_id        : 
urgency_name          : Low
impact_name           : Low
attachments           : {}
custom_field          : 
tags                  : {@{name=Create New Customer}}

 So here's my conundrum:  I want the information collected from this service request.  It asks for two (2) fields.  I would like both so that I can unify them across our collection of tools.  

The Customer Name and Customer Identifier fields are pretty big deals for us.  If we can't pull that out of our ticketing system, then we have to ask what the purpose of that ticketing system is.

image



Best Answer

Hi Carsten,


The below command should help you to get the Data you are looking for,


curl -u user@yourcompany.com:test -H "Content-Type: application/json" -X GET https://domain.freshservice.com/helpdesk/tickets/[display_id]/requested_items.json



1 person has this question

Hi Aaron,


Sorry for missing this thread.


You can make use of API for the Service item and this should help you pull the service item details.


Sample code,

curl -u user@yourcompany.com:test -H "Content-Type: application/json" -X GET https://domain.freshservice.com/catalog/items/[display_id].json

Hi Thushan,


we are having exactly the same problem. The api is working just fine and we can GET tickets, catalog items and so on no problem so far.

We need to work with data from onboarding service requests by api but are also unable to get this data from the corresbonding tickets using a request like this.

"/helpdesk/tickets/[id].json

the reply looks similar to the one above but does not hold any of the requested item information.


your suggestion only returns information regarding the service catalog but not about a certain ticket created using a service catalog request form.


i´m fairly new to curl. am i missing something obvious here?


thanks in advance

br

Carsten

Answer

Hi Carsten,


The below command should help you to get the Data you are looking for,


curl -u user@yourcompany.com:test -H "Content-Type: application/json" -X GET https://domain.freshservice.com/helpdesk/tickets/[display_id]/requested_items.json



2 people like this

Hi Thushan,


thanks alot, works perfectly.


br,

carsten

This helped me. I couldn't find any information on this in the API documentation.

Does anyone have any documentation on updating these items via the API?


1 person likes this

I am looking for more information on Service Requests with the V1 API as well.  I have a ticket opened.  If I find anything out I'll post it here. 

Login or Signup to post a comment
JS Bin