Jump to content

TomW

Hornbill Users
  • Posts

    54
  • Joined

  • Last visited

  • Days Won

    1

TomW last won the day on November 27 2018

TomW had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

TomW's Achievements

Enthusiast

Enthusiast (6/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

3

Reputation

  1. Hello Steve It was scheduled using the calendar button (shown in green): I thought at first it happened if I didn't un-schedule this change first (like below): I tried to replicate this again today by not un-scheduling it first but this time it set the date normally like this:
  2. Some of the dates in the Timeline are stored like yours , but others don't or are a mix of GMT time and normal (normal like the format in Berto's screen shot above)
  3. I have encountered a rather bizarre issue in the Timeline of change requests when the request is scheduled. The Scheduled to and from date appear in different formats: As you can see one date and time is in GMT format and the other isn't? I have never encountered this before so If you can offer any advice please let me know. Thanks Tom
  4. I tried calling a similar API request but this time calling the "read" API method within the "SearchHistory" web service as follows: function Get_SearchHistory { <# .SYNOPSIS Attempt to get a list of scheduled requests #> #region : VARIABLES [String]$Method = "read" [String]$Parameter = @() [String]$RestMethod = "post" [String]$Service = "apps/com.hornbill.servicemanager/SearchHistory" [Int]$deskID = 5 #this field is int32 where the maximum value is 2147483647 [Int]$RowStart = 1 [Int]$RowCount = 20 #this field is int32 where the maximum value is 2147483647 #endregion @ VARIABLES #region : Assign API parameters $Parameter = @( "<searchTerm></searchTerm>" ) Write-Host($RowStart) #endregion : Assign API parameters [String]$ParameterIsCMInstalled = "true" [String]$ParameterLanguage = "en-GB" Try { $InvokeSmXmlMcParam = @{ Method = $Method Parameter = $Parameter RestMethod = $RestMethod Service = $Service ErrorAction = 'Stop' } #Write-Host($InvokeSmXmlMcParam) $ApiResponse = Invoke-HbRestMethod @InvokeSmXmlMcParam $retVal = $ApiResponse } #Try Catch { $retVal = -1 Write-Error $_.Exception.Message } #catch return $retVal } The output, particularly the JSON, was as follows: queryExecJSON ------------- ["finance","mam","morning","etarmis"] Unlike the "getScheduledRequests" API method this one seems to work. I suspect the the "getScheduledRequests" API method is broken. It shows as successful but returns no data even though we have numerous scheduled requests.
  5. I am trying to retrieve a list of requests that have been scheduled using the Hornbill API. The API that I am calling is the getScheduledRequests API and I am using the following PowerShell script: function Get_ScheduledRequests { <# .SYNOPSIS Attempt to get a list of scheduled requests #> #region : VARIABLES [String]$Method = 'getScheduledRequests' [String]$Parameter = @() [String]$RestMethod = 'post' [String]$Service = 'apps/com.hornbill.servicemanager/ScheduledRequests' [Int]$RowStart = 1 [Int]$RowCount = 2147483647 #this field is int32 where the maximum value is 2147483647 #endregion @ VARIABLES #region : Assign API parameters $Parameter = @( #"<searchFilter>h_status=status.open</searchFilter>" #"<deskId></deskId>" "<rowStart>$RowStart</rowStart>" "<rowLimit>$RowCount</rowLimit>" ) #endregion : Assign API parameters [String]$ParameterIsCMInstalled = 'true' [String]$ParameterLanguage = "en-GB" Try { $InvokeSmXmlMcParam = @{ Method = $Method Parameter = $Parameter RestMethod = $RestMethod Service = $Service ErrorAction = 'Stop' } echo($InvokeSmXmlMcParam) $ApiResponse = Invoke-HbRestMethod @InvokeSmXmlMcParam $retVal = $ApiResponse } #Try Catch { $retVal = -1 Write-Error $_.Exception.Message } #catch return $retVal } The value returned is as follows: outcome totalRecordCount scheduledRequests ------- ---------------- ----------------- success 0 [] We have a lot of requests which have been scheduled so I am wondering if I am passing the wrong information to the API method. I know the rest of the code (not shown above) works fine as I use other Hornbill APIs to run and retrieve reports. If you could highlight any obvious mistakes I've made or point me in the right direction that would be a great help!
  6. Thanks for the information. I will see if we can use the service level targets for this. Cheers Tom
  7. Hello I was wondering if it is possible to automatically close a call if it has been active for certain period of time? For example if an incident was raised 2 weeks ago and the company has a policy to close all active (open, new, on hold etc.) incidents that are over 2 weeks old. Would this have to be done in a workflow or is there a setting in Hornbill that does this?
  8. Further to the issue above I have been trying to pass the user input variable when calling the "reportRun" API as follows: $Parameter = @( "<reportid>$reportID</reportid>" "<runtimeParameter><inputParameter><uuid>idDateLogged</uuid><value>2019-04-30 00:00:01</value></inputParameter></runtimeParameter>" ) When the code runs I get the error: Running report: 516 Run-HbReport : The element <uiid> was expected 1 time(s) at location '/methodCall/params/runtimeParameter/inputParameter/uuid' but encountered <uuid> instead At G:\Release Team\PowerBI\Incidents Related to Known Errors and Problems - Exp\Experiments\RCV - Known Errors Problems and Associated Calls\PowerShell Script\Run and Download Report.ps1:369 char:23 + $runRepResponse = Run-HbReport($reportId) + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Run-HbReport The value "idDateLogged" in my code is the variable reference name that is stored when the user is asked to input a date when running the report manually. Although I may be using the wrong value for the uuid the error message returned shows that it was expecting the element "<uiid>" which isn't mentioned anywhere in the API documentation for the "reportRun" API method, and is not present in the PowerShell code that I wrote. Please could you offer some advice? Cheers
  9. I have been writing code to run, check and retrieve reports using the Hornbill API (via a PowerShell script), and this all works fine. However a couple reports have filters like "Requests -> Date Logged value is less than <User prompted input>". Is It possible to pass the "<User prompted input>" values when using the API, e.g. using something like the 'runtimeParameter' input parameter? If so how would I go about doing this? I've had a look at the source code for the 'goHornbillReportRunner-master' but the report runner doesn't include an option for this. Any advice would be useful, even confirming if this isn't possible would help as it would stop me barking up a none existent tree. Cheers Tom
  10. I have finally got this working after spending too much time barking up the wrong tree. The code to do this in PowerShell is fairly simple: [string]$url = $davendpoint + "reports/" + $reportID + "/" + $reportFileLink echo("URI: " + $url) Try { $wc = New-Object System.Net.WebClient $wc.Headers.Add("Authorization","ESP-APIKEY " + $apiKey) $wc.DownloadFile($url,$outputLocation) return -1 } Catch { Write-Error $_.Exception.Message #echo("hey ho pip and dandy") return $apiResponse } The $davendpoint variable is just the combination the values that you advised above. thanks for your help. Cheers, Tom
  11. Thanks for the information and for getting back so quickly. I'll have a look at it now.
  12. I am writing a PowerShell script to run a report using the Hornbill api and then to download the report to a specified directory. I can run the report and retrieve the name for the report e.g. "Check for Re-Openned Calls_23851.xlsx" but I do not know where I can retreieve the report from. please could you offer some advice? Cheers Tom
  13. sorry I posted this query on the wrong forum. It should be on the service manager forum
  14. I am writing a PowerShell script to run a report using the Hornbill api and then to download the report to a specified directory. I can run the report and retrieve the name for the report e.g. "Check for Re-Openned Calls_23851.xlsx" but I do not know where I can retreieve the report from. please could you offer some advice? Cheers Tom
×
×
  • Create New...